summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-12-08 14:32:06 +1000
committerAdam Jackson <ajax@redhat.com>2017-01-02 14:11:11 -0500
commit1b42f9505ff3a39b441464f553442079b750fe88 (patch)
treec528db7a51ea23d7d0fc9865e8a36bff13e231ca
parentc96c860b6420adf0d004707a323af30491a1d7d3 (diff)
os: return 0 from check_timers if we touched any of them
Fixes a regression introduced in 0b2f30834b1a9f. If a driver posts input events during a timer function (wacom and synaptics do this during tap timeouts), ProcessInputEvents() is not called for these events. There are no new events on any fds, so the events just sit in the queue waiting for something else to happen. Fix this by simply returning 0 from check_timers if we ran at least one of them or reset them all. This way the callers ospoll_wait will exit and continue with normal processing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
-rw-r--r--os/WaitFor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/os/WaitFor.c b/os/WaitFor.c
index ff1c85e3a..613608faf 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -143,7 +143,7 @@ check_timers(void)
{
OsTimerPtr timer;
- while ((timer = first_timer()) != NULL) {
+ if ((timer = first_timer()) != NULL) {
CARD32 now = GetTimeInMillis();
int timeout = timer->expires - now;
@@ -157,6 +157,8 @@ check_timers(void)
/* time has rewound. reset the timers. */
CheckAllTimers();
}
+
+ return 0;
}
return -1;
}