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 7618c961a8)
This commit is contained in:
Sebastian Krzyszkowiak 2019-04-12 00:59:19 +02:00 committed by Peter Hutterer
parent 88f0ad5a27
commit 13e82c582e

View file

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