mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-05 08:40:26 +01:00
evdev: INPUT_PROP_DIRECT devices can't be touchpads
Devices that are direct input devices are marked by the kernel with the INPUT_PROP_DIRECT property. Touchpads are always indirect input devices, so let's do the easiest check first before we try device-specific capabilities. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
eae6bec344
commit
90b8de4ddd
1 changed files with 2 additions and 1 deletions
|
|
@ -672,7 +672,8 @@ evdev_configure_device(struct evdev_device *device)
|
|||
has_rel = 1;
|
||||
|
||||
if (libevdev_has_event_type(evdev, EV_KEY)) {
|
||||
if (libevdev_has_event_code(evdev, EV_KEY, BTN_TOOL_FINGER) &&
|
||||
if (!libevdev_has_property(evdev, INPUT_PROP_DIRECT) &&
|
||||
libevdev_has_event_code(evdev, EV_KEY, BTN_TOOL_FINGER) &&
|
||||
!libevdev_has_event_code(evdev, EV_KEY, BTN_TOOL_PEN) &&
|
||||
(has_abs || has_mt)) {
|
||||
device->dispatch = evdev_mt_touchpad_create(device);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue