summaryrefslogtreecommitdiffstats
path: root/driver/remote.c
diff options
context:
space:
mode:
authorSimon Rettberg2024-09-06 14:42:37 +0200
committerSimon Rettberg2024-09-06 14:42:37 +0200
commitbadef32037f52f79abc1f1440b786cd71afdf270 (patch)
tree412b792d4cab4a7a110db82fcf74fe8a1ac55ec1 /driver/remote.c
parentDelete pre-6.00 files (diff)
downloadxscreensaver-master.tar.gz
xscreensaver-master.tar.xz
xscreensaver-master.zip
Diffstat (limited to 'driver/remote.c')
-rw-r--r--driver/remote.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/driver/remote.c b/driver/remote.c
index 123bc28..ee1e6f2 100644
--- a/driver/remote.c
+++ b/driver/remote.c
@@ -1,4 +1,4 @@
-/* xscreensaver-command, Copyright © 1991-2021 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver-command, Copyright © 1991-2024 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -80,9 +80,14 @@ reset_dpms_timer (Display *dpy)
if (!enabled)
goto DONE;
- /* Do this even if power == DPMSModeOn to reset the timer */
DPMSForceLevel (dpy, DPMSModeOn);
+ /* We want to reset the timer inside the X server. DPMSForceLevel doesn't
+ do that if the monitor was already powered on: it keeps counting down.
+ But disabling and re-enabling seems to do the trick. */
+ DPMSDisable (dpy);
+ DPMSEnable (dpy);
+
DONE:
XSync (dpy, False);
XSetErrorHandler (old_handler);