summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-04-03 16:41:15 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-04-09 10:41:59 +1000
commit6ad856790630393bbd41b0bd7746ed9b0629a7c6 (patch)
tree0fd56df86745a38dcaf3fad3bab628d03840c98c /src
parentbec41416dbbee73eef9eee122d0acacc148e329d (diff)
eventcomm: read one more event after finishing a sync
Once the sync finishes, we get -EAGAIN. This only indicates the sync is done, but some events may still be waiting in the pipe for us to read. We must read those now, otherwise select may not trigger on further data. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/eventcomm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 5030150..0cbbbd0 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -491,8 +491,10 @@ SynapticsReadEvent(InputInfoPtr pInfo, struct input_event *ev)
if (rc != -EAGAIN) {
LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error %d\n", pInfo->name,
errno);
- } else if (proto_data->read_flag == LIBEVDEV_READ_FLAG_SYNC)
+ } else if (proto_data->read_flag == LIBEVDEV_READ_FLAG_SYNC) {
proto_data->read_flag = LIBEVDEV_READ_FLAG_NORMAL;
+ return SynapticsReadEvent(pInfo, ev);
+ }
return FALSE;
}