[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.109,1.110

Jindrich Makovicka CVS henry at mplayerhq.hu
Mon Nov 4 09:22:05 CET 2002


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv15804

Modified Files:
	x11_common.c 
Log Message:
yet another screensaver fix

Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -r1.109 -r1.110
--- x11_common.c	3 Nov 2002 16:58:07 -0000	1.109
+++ x11_common.c	4 Nov 2002 08:21:46 -0000	1.110
@@ -755,6 +755,7 @@
                 // DPMS does not seem to be enabled unless we call DPMSInfo
 	        BOOL onoff;
         	CARD16 state;
+		DPMSForceLevel(mDisplay, DPMSModeOn);
         	DPMSInfo(mDisplay, &state, &onoff);
                 if (onoff) {
 	            mp_msg(MSGT_VO,MSGL_INFO,"Successfully enabled DPMS\n");
@@ -776,8 +777,10 @@
 	timeout_save=0;
     }
 
-    if (xscreensaver_was_running && stop_xscreensaver)
-       system("xscreensaver -no-splash &");
+    if (xscreensaver_was_running && stop_xscreensaver) {
+	system("cd /; xscreensaver -no-splash &");
+	xscreensaver_was_running = 0;
+    }
 
 }
 
@@ -802,9 +805,11 @@
 	}
     }
 #endif
-    XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
-    if (timeout_save)
-	XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp);
+    if (!timeout_save) {
+	XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
+	if (timeout_save)
+	    XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp);
+    }
     xscreensaver_was_running = stop_xscreensaver && ! system("xscreensaver-command -exit");
 		    // turning off screensaver
 }




More information about the MPlayer-cvslog mailing list