[PATCH] dix: restore lastDeviceEventTime update in dixSaveScreens

Julien Cristau jcristau at debian.org
Fri Feb 12 14:34:57 PST 2010


This was removed in 6b5978dcf1f7ac3ecc2f22df06f7000f360e2066 (Do not
reset lastDeviceEventTime when we do dixSaveScreens), but caused a
regression for XResetScreenSaver.  Add the lastDeviceEventTime update
back, but restrict it to that case.

X.Org bug#25855 <http://bugs.freedesktop.org/25855>

Reported-by: Lubos Lunak <l.lunak at suse.cz>
Tested-by: Lubos Lunak <l.lunak at suse.cz>
Signed-off-by: Julien Cristau <jcristau at debian.org>
---
 dix/window.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dix/window.c b/dix/window.c
index caff1cb..2676a54 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -3233,8 +3233,13 @@ dixSaveScreens(ClientPtr client, int on, int mode)
 	}
     }
     screenIsSaved = what;
-    if (mode == ScreenSaverReset)
-       SetScreenSaverTimer();
+    if (mode == ScreenSaverReset) {
+	if (on == SCREEN_SAVER_FORCER) {
+	    UpdateCurrentTimeIf();
+	    lastDeviceEventTime = currentTime;
+	}
+	SetScreenSaverTimer();
+    }
     return Success;
 }
 
-- 
1.6.6.1



More information about the xorg-devel mailing list