touchpad: remove a leftover check for fake resolution
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 16 Jul 2015 05:54:47 +0000 (15:54 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 20 Jul 2015 01:17:55 +0000 (11:17 +1000)
obsolete since 8658ff159d416b6a567acb2aaf72b27887ad8576. And once we remove
that all we checkf or is Apple models which we set a resolution for in
systemd. So that check is obsolete now too.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-mt-touchpad.c

index cbe8bed..9202379 100644 (file)
@@ -1464,18 +1464,13 @@ tp_init_palmdetect(struct tp_dispatch *tp,
 
        /* Wacom doesn't have internal touchpads,
         * Apple touchpads are always big enough to warrant palm detection */
-       if (device->model == EVDEV_MODEL_WACOM_TOUCHPAD) {
+       if (device->model == EVDEV_MODEL_WACOM_TOUCHPAD)
+               return 0;
+
+       /* Enable palm detection on touchpads >= 70 mm. Anything smaller
+          probably won't need it, until we find out it does */
+       if (width/device->abs.absinfo_x->resolution < 70)
                return 0;
-       } else if (device->model != EVDEV_MODEL_APPLE_TOUCHPAD) {
-               /* We don't know how big the touchpad is */
-               if (device->abs.absinfo_x->resolution == 1)
-                       return 0;
-
-               /* Enable palm detection on touchpads >= 70 mm. Anything smaller
-                  probably won't need it, until we find out it does */
-               if (width/device->abs.absinfo_x->resolution < 70)
-                       return 0;
-       }
 
        /* palm edges are 5% of the width on each side */
        tp->palm.right_edge = device->abs.absinfo_x->maximum - width * 0.05;