diff options
author | Simon Rettberg | 2024-09-06 14:42:37 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-09-06 14:42:37 +0200 |
commit | badef32037f52f79abc1f1440b786cd71afdf270 (patch) | |
tree | 412b792d4cab4a7a110db82fcf74fe8a1ac55ec1 /driver/remote.c | |
parent | Delete pre-6.00 files (diff) | |
download | xscreensaver-master.tar.gz xscreensaver-master.tar.xz xscreensaver-master.zip |
Diffstat (limited to 'driver/remote.c')
-rw-r--r-- | driver/remote.c | 9 |
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); |