mirror of
https://github.com/X11Libre/xf86-input-synaptics.git
synced 2026-03-24 01:34:04 +00:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user