summaryrefslogtreecommitdiff
path: root/xserver/Xext
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2013-12-28 14:40:03 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2013-12-28 14:40:03 +0000
commitfc3a735d42a0dcd748b6b8dc2c63bafde01effd0 (patch)
tree9b40fc63ccdb80ebec638a8c31e73c17f8dbbaeb /xserver/Xext
parentda8308393b93d5c87075d65ace98cd249643e165 (diff)
Update to xserver 1.14.5
Diffstat (limited to 'xserver/Xext')
-rw-r--r--xserver/Xext/sync.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/xserver/Xext/sync.c b/xserver/Xext/sync.c
index 1e3d43ee6..4ed60fdb6 100644
--- a/xserver/Xext/sync.c
+++ b/xserver/Xext/sync.c
@@ -2654,7 +2654,16 @@ IdleTimeBlockHandler(pointer pCounter, struct timeval **wt, pointer LastSelectMa
IdleTimeQueryValue(counter, &idle);
counter->value = idle; /* push, so CheckTrigger works */
- if (less && XSyncValueLessOrEqual(idle, *less)) {
+ /**
+ * There's an indefinite amount of time between ProcessInputEvents()
+ * where the idle time is reset and the time we actually get here. idle
+ * may be past the lower bracket if we dawdled with the events, so
+ * check for whether we did reset and bomb out of select immediately.
+ */
+ if (less && XSyncValueGreaterThan(idle, *less) &&
+ LastEventTimeWasReset(priv->deviceid)) {
+ AdjustWaitForDelay(wt, 0);
+ } else if (less && XSyncValueLessOrEqual(idle, *less)) {
/*
* We've been idle for less than the threshold value, and someone
* wants to know about that, but now we need to know whether they