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:
+7
-7
@@ -524,16 +524,16 @@ evdev_handle_device(struct evdev_device *device)
|
|||||||
break;
|
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)) {
|
if (TEST_BIT(key_bits, BTN_TOUCH)) {
|
||||||
device->caps |= EVDEV_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)) {
|
if (TEST_BIT(ev_bits, EV_LED)) {
|
||||||
device->caps |= EVDEV_KEYBOARD;
|
device->caps |= EVDEV_KEYBOARD;
|
||||||
|
|||||||
Reference in New Issue
Block a user