Commit cb3057da authored by Peter Hutterer's avatar Peter Hutterer Committed by Adam Jackson

os: return 0 from check_timers if we touched any of them

Fixes a regression introduced in 0b2f3083. 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's avatarPeter Hutterer <>
Reviewed-by: Keith Packard's avatarKeith Packard <>
parent db03742c
......@@ -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. */
return 0;
return -1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment