mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-24 08:50:21 +01:00
If the caller doesn't sync when it should, process all events regardless
libevdev needs to maintain the correct state of the device, even if the caller decides to drop all delta events after a SYN_DROPPED. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
d347e7d4e4
commit
a10fc33cd8
1 changed files with 6 additions and 4 deletions
|
|
@ -548,10 +548,12 @@ int libevdev_next_event(struct libevdev *dev, unsigned int flags, struct input_e
|
|||
return rc;
|
||||
}
|
||||
} else if (dev->need_sync) {
|
||||
/* FIXME: still need to call update_state for all events
|
||||
* here, otherwise the library has the wrong view of the
|
||||
* device too */
|
||||
queue_shift_multiple(dev, dev->queue_nsync, NULL);
|
||||
struct input_event e;
|
||||
|
||||
/* call update_state for all events here, otherwise the library has the wrong view
|
||||
of the device too */
|
||||
while (queue_shift(dev, &e) == 0)
|
||||
update_state(dev, &e);
|
||||
}
|
||||
|
||||
/* FIXME: check for O_NONBLOCK and if not set, skip if we have an
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue