mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-24 19:20:06 +01:00
Only sync the initial MT state for Protocol B devices
For protocol A devices we won't get the information from the kernel anyway and we expect all axes to be updated in the next event. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
parent
7164e1d412
commit
ca082d5fcb
1 changed files with 3 additions and 1 deletions
|
|
@ -395,7 +395,9 @@ libevdev_set_fd(struct libevdev* dev, int fd)
|
|||
}
|
||||
|
||||
dev->fd = fd;
|
||||
sync_mt_state(dev, 0);
|
||||
if (!libevdev_has_event_code(dev, EV_ABS, ABS_MT_SLOT - 1) &&
|
||||
libevdev_has_event_code(dev, EV_ABS, ABS_MT_SLOT))
|
||||
sync_mt_state(dev, 0);
|
||||
|
||||
rc = init_event_queue(dev);
|
||||
if (rc < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue