summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r--video/out/x11_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 89cded6b5d..911fea3ddc 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1562,12 +1562,15 @@ static void set_screensaver(struct vo_x11_state *x11, bool enabled)
BOOL onoff = 0;
CARD16 state;
DPMSInfo(mDisplay, &state, &onoff);
+ if (!x11->dpms_touched && enabled)
+ return; // enable DPMS only we we disabled it before
if (enabled != !!onoff) {
MP_VERBOSE(x11, "Setting DMPS: %s.\n", enabled ? "on" : "off");
if (enabled) {
DPMSEnable(mDisplay);
} else {
DPMSDisable(mDisplay);
+ x11->dpms_touched = true;
}
DPMSInfo(mDisplay, &state, &onoff);
if (enabled != !!onoff)