Commit 0811a9ff authored by Olivier Fourdan's avatar Olivier Fourdan

xwayland: non-rootless requires the wl_shell protocol

When running non-rootless, Xwayland requires that the Wayland compositor
supports the wl_shell protocol.

Check for wl_shell protocol support at startup and exit cleanly if
missing rather than segfaulting later in ensure_surface_for_window()
while trying to use wl_shell_get_shell_surface().
Signed-off-by: default avatarOlivier Fourdan <>
Reviewed-by: Michel Dänzer's avatarMichel Dänzer <>
Reviewed-by: Simon Ser's avatarSimon Ser <>
(cherry picked from commit ffd02d9b)
parent b3ae038c
......@@ -1202,6 +1202,11 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
&registry_listener, xwl_screen);
if (!xwl_screen->rootless && !xwl_screen->shell) {
ErrorF("missing wl_shell protocol\n");
return FALSE;
bpc = xwl_screen->depth / 3;
green_bpc = xwl_screen->depth - 2 * bpc;
blue_mask = (1 << bpc) - 1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment