From 13e82c582e32c792c676fb23163dacb0d7c83705 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Fri, 12 Apr 2019 00:59:19 +0200 Subject: [PATCH] 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 (cherry picked from commit 7618c961a87cff83472471c803d533944d4413c0) --- src/evdev-mt-touchpad-buttons.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;