summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--driver/XScreenSaver.ad.in1
-rw-r--r--driver/XScreenSaver_ad.h2
-rw-r--r--driver/prefs.c3
-rw-r--r--driver/subprocs.c2
-rw-r--r--driver/types.h1
-rw-r--r--driver/xscreensaver.c19
6 files changed, 18 insertions, 10 deletions
diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in
index e365486..64cb9b0 100644
--- a/driver/XScreenSaver.ad.in
+++ b/driver/XScreenSaver.ad.in
@@ -38,6 +38,7 @@
*dpmsStandby: 2:00:00
*dpmsSuspend: 2:00:00
*dpmsOff: 4:00:00
+*dpmsFullThrottle: False
*grabDesktopImages: True
*grabVideoFrames: False
*chooseRandomImages: @DEFAULT_IMAGES_P@
diff --git a/driver/XScreenSaver_ad.h b/driver/XScreenSaver_ad.h
index 345bca9..1b97ec5 100644
--- a/driver/XScreenSaver_ad.h
+++ b/driver/XScreenSaver_ad.h
@@ -11,6 +11,7 @@
"*dpmsStandby: 2:00:00",
"*dpmsSuspend: 2:00:00",
"*dpmsOff: 4:00:00",
+"*dpmsFullThrottle: False",
"*grabDesktopImages: True",
"*grabVideoFrames: False",
"*chooseRandomImages: True",
@@ -52,6 +53,7 @@
--command '/bin/sh -c \"man %s; read foo\"'",
"*dateFormat: %d-%b-%y (%a); %I:%M %p",
"*newLoginCommand: dm-tool switch-to-greeter",
+"*externalUngrabCommand: ",
"*installColormap: True",
"*programs: \
maze -root \\n\
diff --git a/driver/prefs.c b/driver/prefs.c
index 6965ad9..ec5583b 100644
--- a/driver/prefs.c
+++ b/driver/prefs.c
@@ -282,6 +282,7 @@ static const char * const prefs[] = {
"dpmsStandby",
"dpmsSuspend",
"dpmsOff",
+ "dpmsFullThrottle",
"grabDesktopImages",
"grabVideoFrames",
"chooseRandomImages",
@@ -826,6 +827,7 @@ write_init_file (Display *dpy,
CHECK("dpmsStandby") type = pref_time, t = p->dpms_standby;
CHECK("dpmsSuspend") type = pref_time, t = p->dpms_suspend;
CHECK("dpmsOff") type = pref_time, t = p->dpms_off;
+ CHECK("dpmsFullThrottle") continue; /* don't save */
CHECK("grabDesktopImages") type =pref_bool, b = p->grab_desktop_p;
CHECK("grabVideoFrames") type =pref_bool, b = p->grab_video_p;
@@ -1084,6 +1086,7 @@ load_init_file (Display *dpy, saver_preferences *p)
p->dpms_standby = 1000 * get_minutes_resource (dpy, "dpmsStandby", "Time");
p->dpms_suspend = 1000 * get_minutes_resource (dpy, "dpmsSuspend", "Time");
p->dpms_off = 1000 * get_minutes_resource (dpy, "dpmsOff", "Time");
+ p->dpms_full_throttle_p = get_boolean_resource (dpy, "dpmsFullThrottle", "Boolean");
p->grab_desktop_p = get_boolean_resource (dpy, "grabDesktopImages", "Boolean");
p->grab_video_p = get_boolean_resource (dpy, "grabVideoFrames", "Boolean");
diff --git a/driver/subprocs.c b/driver/subprocs.c
index 13b47a4..9f4b075 100644
--- a/driver/subprocs.c
+++ b/driver/subprocs.c
@@ -983,7 +983,7 @@ spawn_screenhack (saver_screen_info *ssi)
saver_preferences *p = &si->prefs;
XFlush (si->dpy);
- if (!monitor_powered_on_p (si))
+ if (!p->dpms_full_throttle_p && !monitor_powered_on_p (si))
{
if (si->prefs.verbose_p)
fprintf (stderr,
diff --git a/driver/types.h b/driver/types.h
index 8ecef71..93c6731 100644
--- a/driver/types.h
+++ b/driver/types.h
@@ -137,6 +137,7 @@ struct saver_preferences {
Time dpms_standby; /* how long until monitor goes black */
Time dpms_suspend; /* how long until monitor power-saves */
Time dpms_off; /* how long until monitor powers down */
+ Bool dpms_full_throttle_p; /* Never kill or suspend hack when screen is off */
Bool grab_desktop_p; /* These are not used by "xscreensaver" */
Bool grab_video_p; /* itself: they are used by the external */
diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c
index 4f59291..d44ea40 100644
--- a/driver/xscreensaver.c
+++ b/driver/xscreensaver.c
@@ -1380,15 +1380,16 @@ main_loop (saver_info *si)
was_locked = True;
si->dbox_up_p = True;
- /* bwlp: make sure saver is running */
- usleep(50000);
- for (i = 0; i < si->nscreens; i++)
- if (si->screens[i].pid == 0)
- spawn_screenhack (&si->screens[i]);
- usleep(100000);
- /* -- */
- for (i = 0; i < si->nscreens; i++)
- suspend_screenhack (&si->screens[i], True); /* suspend */
+ if (p->dpms_full_throttle_p)
+ {
+ for (i = 0; i < si->nscreens; i++)
+ if (si->screens[i].pid == 0)
+ spawn_screenhack (&si->screens[i]);
+ usleep(100000);
+ }
+ else
+ for (i = 0; i < si->nscreens; i++)
+ suspend_screenhack (&si->screens[i], True); /* suspend */
XUndefineCursor (si->dpy, ssi->screensaver_window);
ok_to_unblank = unlock_p (si);