xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 9 08:52:45 UTC 2020


 hw/xwayland/xwayland-screen.c |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit ffd02d9b26bd560849c407a6dd4f5c4d7d2c1736
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Mon Nov 2 15:44:31 2020 +0100

    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 at redhat.com>
    Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>
    Reviewed-by: Simon Ser <contact at emersion.fr>

diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c
index bc6751be7..c18e2fbb5 100644
--- a/hw/xwayland/xwayland-screen.c
+++ b/hw/xwayland/xwayland-screen.c
@@ -635,6 +635,11 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
                              &registry_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;


More information about the xorg-commit mailing list