diff options
| author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-05-31 15:01:32 +1000 |
|---|---|---|
| committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-06-03 14:09:27 +1000 |
| commit | 897dfba2efcd164832f06654c0bfa437e74ee3d7 (patch) | |
| tree | e96333a551aee37e41eee7bafc6aa930a0622237 /libevdev/libevdev.c | |
| parent | 20c4c73adf290b0b6b72bead9f94832a4b83fcbc (diff) | |
| download | libevdev-897dfba2efcd164832f06654c0bfa437e74ee3d7.tar.gz | |
Add a fixme: if we're dropping sync event, libedev loses state info too
If a client doesn't care about syncing that's one thing, but
libevdev functions still need to return the right _current_ (i.e. synced)
value.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'libevdev/libevdev.c')
| -rw-r--r-- | libevdev/libevdev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libevdev/libevdev.c b/libevdev/libevdev.c index bdde2a9..9ce626f 100644 --- a/libevdev/libevdev.c +++ b/libevdev/libevdev.c @@ -541,8 +541,12 @@ int libevdev_next_event(struct libevdev *dev, unsigned int flags, struct input_e if (rc != 0) return rc; } - } else if (dev->need_sync) + } 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); + } /* Always read in some more events. Best case this smoothes over a potential SYN_DROPPED, worst case we don't read fast enough and end up with SYN_DROPPED anyway */ |
