Adds a general wlsc_compositor_shutdown() function that all output
backends call when shutting down. wlsc_compositor_shutdown() will call
a new 'destroy' method of each output to perform backend-specific
cleanup (e.g., turning off the hardware cursor in the DRM compositor).
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
I may have missed something, but - since the Wayland compositor
already picks a platform backend, opens a connection and initializes the
backend specific display data structure it doesn't make sense
to let egl pick a platform. If it picks a different one the
display specific data structure will most likely not match.
Thus determine the platform in the Wayland rendering backend by setting
the EGL_PLATFORM env variable.
For the client any other platform than 'wayland' doesn't seem to make
sense.
I'm not sure if I've got the the platform ofr openfwd right.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
The shell module is responsible for implementing the higher level
compositor behavior. We default to the desktop-lite shell built in to
the compositor.
Instead of having a separate check function, we just mark our x11 event
source as needing a post-dispatch check. The event loop will call our
dispatch function again after all dispatching is done, this time with
mask = 0. If we don't process any events, return 0, so the event loop
doesn't keep calling us.
If somebody else did an X11 round trip, that could leave events in the
XCB buffer that we wouldn't see until the next X event came in. The new
event source check function lets us check the XCB queue after dispatching
and this way we'll see events we need to deal with right away.
The event handling gets a little trickier this way but we need the
keymap sent immdiately after the focus_in event to determine which keys
are pressed as the compositor receives keyboard focus.
We need to look at the focus_in and keymap notify pair to correctly determine
the set of held down keys at focus in time, so generalize the handling
of event pairs in preparation for that.
Instead of calling XGetXCBConnection() blindly, check XOpenDisplay()'s
return value to avoid a possible segfault in the former. That happens if
$DISPLAY is set, but if that display isn't available.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
This lets the compositor place the pointer sprite correctly when it receives
pointer focus and allows it to send pointer focus to any client that might
receive pointer focus as the compositor receives it.
offending message:
Program received signal SIGSEGV, Segmentation fault.
create_pointer_images (ec=0x619f10) at compositor.c:240
240 glEGLImageTargetTexture2DOES(GL_TEXTURE_2D,
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>