From 0c21944e246ea598d0368547a172101d22a3d69d Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Mon, 12 Jun 2017 14:09:55 +0200 Subject: [PATCH] input_id: fix detection of devices with mouse buttons Assign ID_INPUT_MOUSE property to devices with mouse buttons and no axis. Libinput tries to use libwacom on devices with tablet-pad capability which are detected by ID_INPUT_TABLET_PAD=1 property so assign pointer class by setting ID_INPUT_MOUSE=1 to devices with mouse buttons and let libwacom override the class for Wacom pads. --- src/udev/udev-builtin-input_id.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/udev/udev-builtin-input_id.c b/src/udev/udev-builtin-input_id.c index 47f41a6..80c8ba5 100644 --- a/src/udev/udev-builtin-input_id.c +++ b/src/udev/udev-builtin-input_id.c @@ -244,7 +244,9 @@ static bool test_pointers(struct udev_device *dev, is_touchscreen = true; } - if (has_rel_coordinates && has_mouse_button) + if (has_mouse_button && + (has_rel_coordinates || + !has_abs_coordinates)) /* mouse buttons and no axis */ is_mouse = true; if (is_pointing_stick) -- 2.7.4