}
}
- si->cycle_id = XtAppAddTimeOut (si->app, how_long, cycle_timer,
- (XtPointer) si);
+ if (how_long > 0)
+ {
+ si->cycle_id = XtAppAddTimeOut (si->app, how_long, cycle_timer,
+ (XtPointer) si);
-#ifdef DEBUG_TIMERS
- if (p->verbose_p)
- fprintf (stderr, "%s: starting cycle_timer (%ld, %ld)\n",
- blurb(), how_long, si->cycle_id);
-#endif /* DEBUG_TIMERS */
+# ifdef DEBUG_TIMERS
+ if (p->verbose_p)
+ fprintf (stderr, "%s: starting cycle_timer (%ld, %ld)\n",
+ blurb(), how_long, si->cycle_id);
+# endif /* DEBUG_TIMERS */
+ }
+# ifdef DEBUG_TIMERS
+ else
+ {
+ if (p->verbose_p)
+ fprintf (stderr, "%s: not starting cycle_timer: how_long == %d\n",
+ blurb(), how_long);
+ }
+# endif /* DEBUG_TIMERS */
}
/* Call this when user activity (or "simulated" activity) has been noticed.
*/
-static void
+void
reset_timers (saver_info *si)
{
saver_preferences *p = &si->prefs;
watchdog_timer (XtPointer closure, XtIntervalId *id)
{
saver_info *si = (saver_info *) closure;
+ saver_preferences *p = &si->prefs;
disable_builtin_screensaver (si, False);
+ /* If the DPMS settings on the server have changed, change them back to
+ what ~/.xscreensaver says they should be. */
+ sync_server_dpms_settings (si->dpy, p->dpms_enabled_p,
+ p->dpms_standby / 1000,
+ p->dpms_suspend / 1000,
+ p->dpms_off / 1000,
+ False);
+
if (si->screen_blanked_p)
{
Bool running_p = screenhack_running_p (si);