Mercurial > mplayer.hg
changeset 25608:3ada48a71450
Use a screensaver_off variable to save current state and avoid
uselessly disabling twice.
Also needed for a future patch.
author | reimar |
---|---|
date | Mon, 07 Jan 2008 12:18:17 +0000 |
parents | 9d0b189ce1b2 |
children | dc64735e7391 |
files | libvo/x11_common.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/x11_common.c Sun Jan 06 23:20:15 2008 +0000 +++ b/libvo/x11_common.c Mon Jan 07 12:18:17 2008 +0000 @@ -1657,6 +1657,7 @@ static Atom deactivate; static Atom screensaver; +static int screensaver_off; static unsigned int time_last; void xscreensaver_heartbeat(void) @@ -1729,6 +1730,9 @@ void saver_on(Display * mDisplay) { + if (!screensaver_off) + return; + screensaver_off = 0; if (xss_suspend(False)) return; #ifdef HAVE_XDPMS @@ -1791,6 +1795,9 @@ { int nothing; + if (screensaver_off) + return; + screensaver_off = 1; if (xss_suspend(True)) return; #ifdef HAVE_XDPMS