http://ftp.x.org/contrib/applications/xscreensaver-2.23.tar.gz
[xscreensaver] / driver / timers.c
index dcff2e4e42116e22633f57ea9e6d22a68c0a69e3..89026d1bd6d5b168bba4004cf1966c243e1e1fc2 100644 (file)
@@ -181,10 +181,10 @@ cycle_timer (XtPointer closure, XtIntervalId *id)
   saver_info *si = (saver_info *) closure;
   saver_preferences *p = &si->prefs;
   Time how_long = p->cycle;
-  if (si->dbox_up_p)
+  if (si->dbox_up_p || si->question_up_p)
     {
       if (p->verbose_p)
-       printf ("%s: dbox up; delaying hack change.\n", progname);
+       printf ("%s: dialog box up; delaying hack change.\n", progname);
       how_long = 30000; /* 30 secs */
     }
   else
@@ -608,6 +608,14 @@ watchdog_timer (XtPointer closure, XtIntervalId *id)
 #endif /* DEBUG_TIMERS */
 
          raise_window (si, True, True, running_p);
+
+         if (!monitor_powered_on_p (si))
+           {
+             if (si->prefs.verbose_p)
+               printf ("%s: server reports that monitor has powered down; "
+                       "killing running hacks.\n", progname);
+             kill_screenhack (si);
+           }
        }
     }
 }