Move Wacom touchpad tagging to the udev rules
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 5 Jun 2015 06:17:04 +0000 (16:17 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 11 Jun 2015 22:53:57 +0000 (08:53 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
src/evdev-mt-touchpad.c
src/evdev.c
src/evdev.h
udev/90-libinput-model-quirks.hwdb

index 5143ab1..34cc85d 100644 (file)
@@ -1395,7 +1395,6 @@ tp_init_palmdetect(struct tp_dispatch *tp,
                   struct evdev_device *device)
 {
        int width, height;
-       unsigned int vendor_id;
 
        tp->palm.right_edge = INT_MAX;
        tp->palm.left_edge = INT_MIN;
@@ -1406,11 +1405,9 @@ tp_init_palmdetect(struct tp_dispatch *tp,
        height = abs(device->abs.absinfo_y->maximum -
                    device->abs.absinfo_y->minimum);
 
-       vendor_id = evdev_device_get_id_vendor(device);
-
        /* Wacom doesn't have internal touchpads,
         * Apple touchpads are always big enough to warrant palm detection */
-       if (vendor_id == VENDOR_ID_WACOM) {
+       if (device->model == EVDEV_MODEL_WACOM_TOUCHPAD) {
                return 0;
        } else if (device->model != EVDEV_MODEL_APPLE_TOUCHPAD) {
                /* We don't know how big the touchpad is */
index c1fe3e5..b8f798e 100644 (file)
@@ -1514,6 +1514,7 @@ evdev_read_model(struct evdev_device *device)
                { "LIBINPUT_MODEL_SYSTEM76_KUDU", EVDEV_MODEL_SYSTEM76_KUDU },
                { "LIBINPUT_MODEL_CLEVO_W740SU", EVDEV_MODEL_CLEVO_W740SU },
                { "LIBINPUT_MODEL_APPLE_TOUCHPAD", EVDEV_MODEL_APPLE_TOUCHPAD },
+               { "LIBINPUT_MODEL_WACOM_TOUCHPAD", EVDEV_MODEL_WACOM_TOUCHPAD },
                { NULL, EVDEV_MODEL_DEFAULT },
        };
        const struct model_map *m = model_map;
index 70a66a2..f074ad7 100644 (file)
@@ -104,6 +104,7 @@ enum evdev_device_model {
        EVDEV_MODEL_SYSTEM76_KUDU,
        EVDEV_MODEL_CLEVO_W740SU,
        EVDEV_MODEL_APPLE_TOUCHPAD,
+       EVDEV_MODEL_WACOM_TOUCHPAD,
 };
 
 struct mt_slot {
index 13ff518..4fda18d 100644 (file)
@@ -71,3 +71,9 @@ libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnSystem76*pvrgalu1*
 # Kudu Professional
 libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnSystem76*pvrkudp1*
  LIBINPUT_MODEL_SYSTEM76_KUDU=1
+
+##########################################
+# Wacom
+##########################################
+libinput:touchpad:input:b0003v056Ap*
+ LIBINPUT_MODEL_WACOM_TOUCHPAD=1