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>
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);