summaryrefslogtreecommitdiff
path: root/os/WaitFor.c
diff options
context:
space:
mode:
authorFredrik Höglund <fredrik@kde.org>2006-03-31 18:49:38 +0000
committerFredrik Höglund <fredrik@kde.org>2006-03-31 18:49:38 +0000
commit7ea30b507f4ce5ce20fbfaca80f7d5b53a99eb1d (patch)
treebd9ab6c21ffb47e8e8d30598ac96a460fde26cf8 /os/WaitFor.c
parentacca49b1a5a6c034f3b9d51d9016b8a7d43da809 (diff)
Move the screensaver extension from module to builtins.
Add the server side implementation of the ScreenSaverSuspend request. Require scrnsaverproto >= 1.1, and change the linking order of the Xorg static libs.
Diffstat (limited to 'os/WaitFor.c')
-rw-r--r--os/WaitFor.c14
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);
}