[MPlayer-cvslog] r25636 - trunk/libvo/x11_common.c
    reimar 
    subversion at mplayerhq.hu
       
    Mon Jan  7 13:18:17 CET 2008
    
    
  
Author: reimar
Date: Mon Jan  7 13:18:17 2008
New Revision: 25636
Log:
Use a screensaver_off variable to save current state and avoid
uselessly disabling twice.
Also needed for a future patch.
Modified:
   trunk/libvo/x11_common.c
Modified: trunk/libvo/x11_common.c
==============================================================================
--- trunk/libvo/x11_common.c	(original)
+++ trunk/libvo/x11_common.c	Mon Jan  7 13:18:17 2008
@@ -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
    
    
More information about the MPlayer-cvslog
mailing list