diff options
Diffstat (limited to 'driver/timers.c')
-rw-r--r-- | driver/timers.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/driver/timers.c b/driver/timers.c index 5aa568c..b096000 100644 --- a/driver/timers.c +++ b/driver/timers.c @@ -695,6 +695,19 @@ swallow_unlock_typeahead_events (saver_info *si, XEvent *e) memset (buf, 0, sizeof(buf)); } +void +flush_events (saver_info *si) +{ + int i; + XEvent xe; + for (i = 0; i < 10; ++i) { + while (XtAppPending (si->app) & XtIMXEvent) { + XtAppNextEvent (si->app, &xe); + dispatch_event (si, &xe); + } + usleep(5000); + } +} /* methods of detecting idleness: @@ -1663,7 +1676,7 @@ watchdog_timer (XtPointer closure, XtIntervalId *id) raise_window (si, True, True, running_p); } - if (screenhack_running_p (si) && + if (!p->dpms_full_throttle_p && screenhack_running_p (si) && !monitor_powered_on_p (si)) { int i; |