<p dir="ltr">Hi Armin,</p>
<p dir="ltr">first of all I wish you existing and successful project experience!</p>
<p dir="ltr">About the missing output for clients, have just an idea: how about creating some fake output object, maybe defined in weston.ini and send this to the clients. <br>
Client needs also the information that current output is a fake output in order to decide what to do: just continue or wait for a real one.<br>
Compositor could just pass the buffers that are arrived on the fake output to the real one, ones its available.</p>
<p dir="ltr">Just an idea.<br>
</p>
<div class="gmail_quote">Am 30.04.2016 5:20 nachm. schrieb "Armin Krezović" <<a href="mailto:krezovic.armin@gmail.com">krezovic.armin@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
Now that I've analyzed the weston codebase a bit, I'm ready to<br>
bombard you people with some questions :).<br>
<br>
For those that aren't yet aware, I'll be working on making weston<br>
able to run with no outputs and survive with all outputs plugged<br>
out at runtime.<br>
<br>
For starters, I've simply commented out the output backend load code<br>
in src/main.c to see what would happen. To my surprise, the compositor<br>
didn't crash, but the desktop-shell did.<br>
<br>
I'm currently guessing that it crashes because the clients that use<br>
clients/window.c code look for outputs in the registry. Of course,<br>
there are none because the backend that updates the global registry<br>
isn't loaded.<br>
<br>
Now, my conclusion is: In order to make weston work without any outputs<br>
present is to make clients work without any outputs present. This will<br>
probably require people to update their toolkits and apps.<br>
<br>
As I've originally proposed, I see two different ways in achieving this:<br>
<br>
First and easiest way is use of a virtual output. I could modify the<br>
DRM backend to add a virtual output if no physical outputs are found<br>
and remove the output when a physical output is connected. Add similar<br>
behavior on phyisical screen unplug. If there are none left, add a virtual<br>
output. If I remember correctly, Pekka once noted that DRM backend already<br>
supports output hotplugging, more or less, but it doesn't support the<br>
primary output unplugging.<br>
<br>
Now, the first question is: Even if this way is picked, would clients or<br>
something else require much work to make them behave correctly when<br>
the primary output is unplugged?<br>
<br>
The second and more harder way is to simply cope with no outputs present and<br>
watch for output plugging/unplugging. This would require clients to watch for<br>
output changes and take apropriate action.<br>
<br>
The second question then might be: What should clients do in such case?<br>
<br>
1. Do they only need to schedule redraw and toggle back fullscreen if it was on?<br>
<br>
2. Do they need to resize/scale relative to the size of new screen? (eg, a maximized<br>
app on 1920x1080 screen would not be entirely visible on 1600x900 one).<br>
<br>
3. Is there something as "move an app to different screen" that can be issued<br>
by compositor? Or do apps need to do that too?<br>
<br>
4. Is there anything special needed for XWayland or is it just another wayland client?<br>
<br>
That would be all for now.<br>
<br>
Armin.<br>
<br>
<br>_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/wayland-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
<br></blockquote></div>