diff options
Diffstat (limited to 'os/WaitFor.c')
-rw-r--r-- | os/WaitFor.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/os/WaitFor.c b/os/WaitFor.c index a2c2126e9..78101906f 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -669,6 +669,16 @@ FreeScreenSaverTimer(void) } } +#ifdef SCREENSAVER +/* + * When this variable is set a client has temporarily suspended the + * screensaver and DPMS, so SetScreenSaverTimer should be a noop. + * The screensaver extension is responsible for stopping and + * restarting the timer when suspension is enabled/disabled. + */ +extern Bool screenSaverSuspended; /* declared in Xext/saver.c */ +#endif /* SCREENSAVER */ + void SetScreenSaverTimer(void) { @@ -699,7 +709,11 @@ SetScreenSaverTimer(void) ScreenSaverTime; } +#ifdef SCREENSAVER + if (timeout && !screenSaverSuspended) { +#else if (timeout) { +#endif ScreenSaverTimer = TimerSet(ScreenSaverTimer, 0, timeout, ScreenSaverTimeoutExpire, NULL); } |