X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=driver%2Ftimers.c;h=aba6d5a3f0d421973fa1b3ef198ae9ce6bb0d13d;hp=77bc8c30fd20b45964ecf2d593324657d6909064;hb=2a991a811de4c7b22f812682b267b616a809fd9a;hpb=ce3185de9d9705e259f2b60dd4b5509007fa17d4 diff --git a/driver/timers.c b/driver/timers.c index 77bc8c30..aba6d5a3 100644 --- a/driver/timers.c +++ b/driver/timers.c @@ -181,7 +181,7 @@ 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 || si->question_up_p) + if (si->dbox_up_p) { if (p->verbose_p) fprintf (stderr, "%s: dialog box up; delaying hack change.\n", @@ -190,6 +190,7 @@ cycle_timer (XtPointer closure, XtIntervalId *id) } else { + maybe_reload_init_file (si); if (p->verbose_p) fprintf (stderr, "%s: changing graphics hacks.\n", blurb()); kill_screenhack (si); @@ -244,7 +245,7 @@ reset_timers (saver_info *si) XtRemoveTimeOut (si->timer_id); si->timer_id = XtAppAddTimeOut (si->app, p->timeout, idle_timer, (XtPointer) si); - if (si->cycle_id) abort (); + if (si->cycle_id) abort (); /* no cycle timer when inactive */ #ifdef DEBUG_TIMERS if (p->verbose_p) @@ -270,6 +271,7 @@ check_pointer_timer (XtPointer closure, XtIntervalId *id) if (p->use_xidle_extension || p->use_mit_saver_extension || p->use_sgi_saver_extension) + /* If an extension is in use, we should not be polling the mouse. */ abort (); si->check_pointer_timer_id = @@ -318,6 +320,20 @@ check_pointer_timer (XtPointer closure, XtIntervalId *id) } +static void +dispatch_event (saver_info *si, XEvent *event) +{ + /* If this is for the splash dialog, pass it along. + Note that the password dialog is handled with its own event loop, + so events for that window will never come through here. + */ + if (si->splash_dialog && event->xany.window == si->splash_dialog) + handle_splash_event (si, event); + + XtDispatchEvent (event); +} + + void sleep_until_idle (saver_info *si, Bool until_idle_p) { @@ -450,7 +466,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p) #endif /* DEBUG_TIMERS */ /* If any widgets want to handle this event, let them. */ - XtDispatchEvent (&event); + dispatch_event (si, &event); /* We got a user event */ if (!until_idle_p) @@ -546,7 +562,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p) else #endif /* HAVE_SGI_SAVER_EXTENSION */ - XtDispatchEvent (&event); + dispatch_event (si, &event); } } DONE: @@ -575,7 +591,7 @@ sleep_until_idle (saver_info *si, Bool until_idle_p) si->timer_id = 0; } - if (until_idle_p && si->cycle_id) + if (until_idle_p && si->cycle_id) /* no cycle timer when inactive */ abort (); return;