mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-26 08:40:06 +01:00
evdev: Clear touch capability if we see a mouse-type button
If an input device has BTN_LEFT (typically) it's not a touch screen but a touch pad.
This commit is contained in:
parent
3fc0ec1bc3
commit
d4c9c6b83b
1 changed files with 7 additions and 7 deletions
14
src/evdev.c
14
src/evdev.c
|
|
@ -524,16 +524,16 @@ evdev_handle_device(struct evdev_device *device)
|
|||
break;
|
||||
}
|
||||
}
|
||||
for (i = BTN_MISC; i < BTN_JOYSTICK; i++) {
|
||||
if (TEST_BIT(key_bits, i)) {
|
||||
device->caps |= EVDEV_BUTTON;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (TEST_BIT(key_bits, BTN_TOUCH)) {
|
||||
device->caps |= EVDEV_TOUCH;
|
||||
}
|
||||
|
||||
for (i = BTN_MISC; i < BTN_JOYSTICK; i++) {
|
||||
if (TEST_BIT(key_bits, i)) {
|
||||
device->caps |= EVDEV_BUTTON;
|
||||
device->caps &= ~EVDEV_TOUCH;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (TEST_BIT(ev_bits, EV_LED)) {
|
||||
device->caps |= EVDEV_KEYBOARD;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue