aboutsummaryrefslogtreecommitdiffhomepage
path: root/libvo
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-07 12:18:17 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-07 12:18:17 +0000
commitf9b11518016457e0a27d12b718394037e9e38941 (patch)
tree375b89cf3f06b3c92cfb733f83771b68f47e3d60 /libvo
parente27d606714997a74b94842a55c1f8bef3bbc6c75 (diff)
Use a screensaver_off variable to save current state and avoid
uselessly disabling twice. Also needed for a future patch. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25636 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/x11_common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 57b1c8eb07..754f638e71 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -1657,6 +1657,7 @@ static Window xs_windowid = 0;
static Atom deactivate;
static Atom screensaver;
+static int screensaver_off;
static unsigned int time_last;
void xscreensaver_heartbeat(void)
@@ -1729,6 +1730,9 @@ static int xss_suspend(Bool suspend)
void saver_on(Display * mDisplay)
{
+ if (!screensaver_off)
+ return;
+ screensaver_off = 0;
if (xss_suspend(False))
return;
#ifdef HAVE_XDPMS
@@ -1791,6 +1795,9 @@ void saver_off(Display * mDisplay)
{
int nothing;
+ if (screensaver_off)
+ return;
+ screensaver_off = 1;
if (xss_suspend(True))
return;
#ifdef HAVE_XDPMS