xwayland: non-rootless requires the XDG-WM-Base protocol
When running non-rootless, Xwayland requires that the Wayland compositor supports the XDG-WM-Base protocol. Check for XDG-WM-Base protocol support at startup and exit cleanly if missing rather than segfaulting later in ensure_surface_for_window() while trying to use xdg_wm_base_get_xdg_surface(). Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Reviewed-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
parent
7a7e55c5c1
commit
ffd02d9b26
|
@ -635,6 +635,11 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
|||
®istry_listener, xwl_screen);
|
||||
xwl_screen_roundtrip(xwl_screen);
|
||||
|
||||
if (!xwl_screen->rootless && !xwl_screen->xdg_wm_base) {
|
||||
ErrorF("missing XDG-WM-Base protocol\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bpc = xwl_screen->depth / 3;
|
||||
green_bpc = xwl_screen->depth - 2 * bpc;
|
||||
blue_mask = (1 << bpc) - 1;
|
||||
|
|
Loading…
Reference in New Issue