If the desktop-shell client goes away for any reason, respawn it. To
avoid harmful looping, limit the respawning to 5 times within 30
seconds, and then give up.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This is typically when launcing from a pty such as an X (or Wayland)
terminal or from an ssh session. Opening a new vt typically requires root
priviledges, so weston must be setuid root or laucnhed as root for this
to work.
Fixes the following build failure:
In file included from window.c:58:0:
window.h:194:16: error: redefinition of typedef 'widget_resize_handler_t'
window.h:178:16: note: previous declaration of 'widget_resize_handler_t' was here
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
We can only set up once we've acquired the VT and we shouldn't release the
VT until we've cleaned up. Before we would release the VT first, and then
race to drop drm master as X tried to get drm master. Which would kill X.
Part of the point of KD_GRAPHICS mode is that the kernel doesn't try
to restore the VT contents when we switch bach, but leaves that
to the user mode process. This avoids ugly flicker of text mode contents
before the compositor takes over.
With all input events going to widgets now, we can grab an input device
to a widget, so that all events are delivered to that widgets handlers.
This lets us implement the last bit of the menu behaviour, that is
the client side grabbing of events. The result is that we can now pop down
the menu when we receive clicks in the clients own windows and we
don't send motion and button events to other widgets.
When we later upload the cursor image with glTexImage2D(), that will unbind
the image just fine. No need for a NULL upload. Except that that doesn't
currently happen with mesa drivers, but the NULL upload is redundant either
way.