summaryrefslogtreecommitdiff
path: root/hw/xwayland
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2020-06-03 10:17:13 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2020-08-04 09:33:15 +0200
commit5c20e4b834145f590c68dbc98e33c7d3d710001a (patch)
treef52d2df65c79f4ec94b47a3e27a1a2a8df564afa /hw/xwayland
parentaac28e162e5108510065ad4c323affd6deffd816 (diff)
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@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw/xwayland')
-rw-r--r--hw/xwayland/xwayland-screen.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c
index d248a3901..92643c0ed 100644
--- a/hw/xwayland/xwayland-screen.c
+++ b/hw/xwayland/xwayland-screen.c
@@ -575,6 +575,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], "-shm") == 0) {
xwl_screen->glamor = 0;