summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Krzyszkowiak <dos@dosowisko.net>2019-04-12 00:59:19 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2019-05-01 14:10:19 +1000
commit13e82c582e32c792c676fb23163dacb0d7c83705 (patch)
treebf1aad0a82983c87247046c85fb4044506772895
parent88f0ad5a2781f5c0b129120f1ab6c68df777a017 (diff)
evdev-mt-touchpad-buttons: use a model quirk instead of vendor ID to identify Apple devices
Recent Apple touchpads use a proper Bluetooth vendor ID assigned to Apple instead of the USB one, so this code would have to check for two vendor IDs and their udev types. However, we already have that matching done via models in quirks, so let's just use that. Signed-off-by: Sebastian Krzyszkowiak <dos@dosowisko.net> (cherry picked from commit 7618c961a87cff83472471c803d533944d4413c0)
-rw-r--r--src/evdev-mt-touchpad-buttons.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c
index 69800e22..11d1d6a5 100644
--- a/src/evdev-mt-touchpad-buttons.c
+++ b/src/evdev-mt-touchpad-buttons.c
@@ -797,7 +797,7 @@ tp_click_get_default_method(struct tp_dispatch *tp)
if (!tp->buttons.is_clickpad)
return LIBINPUT_CONFIG_CLICK_METHOD_NONE;
- else if (libevdev_get_id_vendor(tp->device->evdev) == VENDOR_ID_APPLE)
+ else if (evdev_device_has_model_quirk(device, QUIRK_MODEL_APPLE_TOUCHPAD))
return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER;
return LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;