[PATCH] Update lastDeviceEventTime in XResetScreenSaver

Julien Cristau jcristau at debian.org
Wed Jan 27 13:59:45 PST 2010


On Wed, Jan 27, 2010 at 13:30:35 -0800, Keith Packard wrote:

> On Sat, 02 Jan 2010 10:45:49 -0800, Keith Packard <keithp at keithp.com> wrote:
> 
> > Seems like it would be better to stick this back in dixSaveScreens where
> > it used to be, but restricted to only being done in the
> > SCREE_SAVER_FORCER path when mode is ScreenSaverReset. That way you pick
> > up all of the other ScreenSaverReset cases as well (VT switch,
> > suspend/resume and server startup/shutdown).
> 
> I haven't seen a response to this suggestion...
> 
Something like the following (untested)?  Lubos, does this also fix your
issue?

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;
 }
 
Cheers,
Julien


More information about the xorg-devel mailing list