xserver: Branch 'server-1.20-branch'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 13 13:37:52 UTC 2020


 hw/xwayland/xwayland.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit 3059a2e62ae7ef665a537ee0fc2ec24beccf17ae
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Wed Jun 3 10:17:13 2020 +0200

    xwayland: Disable the MIT-SCREEN-SAVER extension when rootless
    
    Xwayland is just a Wayland client, no X11 screensaver should be
    expected to work reliably on Xwayland when running rootless because
    Xwayland cannot grab the input devices so it has no way to actually
    lock the screen managed by the Wayland compositor.
    
    Turn off the screensaver on Xwayland when running rootless by setting
    the screensaver timeout and interval and their default values to zero
    and disable the MIT-SCREEN-SAVER extension.
    
    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1051
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit 5c20e4b834145f590c68dbc98e33c7d3d710001a)

diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 44d1bb4da..d435fd32f 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -1130,6 +1130,19 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
     for (i = 1; i < argc; i++) {
         if (strcmp(argv[i], "-rootless") == 0) {
             xwl_screen->rootless = 1;
+
+            /* Disable the XSS extension on Xwayland rootless.
+             *
+             * Xwayland is just a Wayland client, no X11 screensaver
+             * should be expected to work reliably on Xwayland rootless.
+             */
+#ifdef SCREENSAVER
+            noScreenSaverExtension = TRUE;
+#endif
+            ScreenSaverTime = 0;
+            ScreenSaverInterval = 0;
+            defaultScreenSaverTime = 0;
+            defaultScreenSaverInterval = 0;
         }
         else if (strcmp(argv[i], "-wm") == 0) {
             xwl_screen->wm_fd = atoi(argv[i + 1]);


More information about the xorg-commit mailing list