summaryrefslogtreecommitdiffstats
path: root/libvo/x11_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r--libvo/x11_common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index a39a0e319d..e2bebcdbe6 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -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 @@ void saver_on(Display *mDisplay) {
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 @@ void saver_off(Display *mDisplay) {
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
}