summaryrefslogtreecommitdiffstats
path: root/driver/timers.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/timers.c')
-rw-r--r--driver/timers.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/driver/timers.c b/driver/timers.c
index ea97f34..591b568 100644
--- a/driver/timers.c
+++ b/driver/timers.c
@@ -689,6 +689,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) != 0) {
+ XtAppNextEvent (si->app, &xe);
+ dispatch_event (si, &xe);
+ }
+ usleep(5000);
+ }
+}
/* methods of detecting idleness:
@@ -1657,7 +1670,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;