Commit 6ad85679 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

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's avatarPeter Hutterer <>
Reviewed-by: default avatarHans de Goede <>
parent bec41416
...@@ -491,8 +491,10 @@ SynapticsReadEvent(InputInfoPtr pInfo, struct input_event *ev) ...@@ -491,8 +491,10 @@ SynapticsReadEvent(InputInfoPtr pInfo, struct input_event *ev)
if (rc != -EAGAIN) { if (rc != -EAGAIN) {
LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error %d\n", pInfo->name, LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error %d\n", pInfo->name,
errno); 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; proto_data->read_flag = LIBEVDEV_READ_FLAG_NORMAL;
return SynapticsReadEvent(pInfo, ev);
return FALSE; return FALSE;
} }
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