[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.90,1.91

Arpi of Ize arpi at mplayerhq.hu
Tue Jun 4 22:12:36 CEST 2002


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

Modified Files:
	x11_common.c 
Log Message:
Activating/Deactivating of XScreenSaver
patch by Joachim Breitner <mail at joachim-breitner.de>


Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- x11_common.c	3 Jun 2002 23:23:03 -0000	1.90
+++ x11_common.c	4 Jun 2002 20:12:34 -0000	1.91
@@ -55,11 +55,13 @@
 #define vo_wm_WMakerStyle 4
 
 int ice_layer=12;
+int stop_xscreensaver=0;
 
 extern int verbose;
 
 static int dpms_disabled=0;
 static int timeout_save=0;
+static int xscreensaver_was_running=0;
 
 char* mDisplayName=NULL;
 Display* mDisplay=NULL;
@@ -798,6 +800,9 @@
 	XGetScreenSaver(mDisplay, &timeout_save, &interval, &prefer_blank, &allow_exp);
     }
 
+    if (xscreensaver_was_running && stop_xscreensaver)
+       system("xscreensaver -no-splash &");
+
 }
 
 void saver_off(Display *mDisplay) {
@@ -824,6 +829,7 @@
     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