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.
This lands the basic behavior of the popup surface type, but there are still
a number of details to be worked out. Mainly there's a hardcoded timeout
to handle the case of releasing the popup button outside any of the
client windows, which triggers popup_end if it happens after the timeout.
Maybe we just need to add that as an argument, or we could add a new event
that fires in this case to let the client decide whether it ends the popup
or not.
Usually there should be at least one input device, when Weston starts
up, or is reactivated by a VT switch. Add a nice warning, in case there
are no input devices.
This is to give a clue to users who happen to try Weston on DRM, and
do not get any response.
Add also a message to another failure case, that may lead to missing
input devices.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Weston initialises to faded-out state, which means all outputs are just
black, even if they render fine.
Previously the fade-in was triggered probably by some random input
event, since Weston was not guaranteed to wake up. Especially with the
drm backend, and the usual problem of not having permissions to input
devices, Weston would not fade in at all and appear broken.
Force Weston to fade in right after initialisation. This show that at
least rendering works, if it does not respond to any input.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>