touchpad: add synaptics semi-mt devices to those needing hysteresis
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 16 Feb 2016 23:06:09 +0000 (09:06 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 17 Feb 2016 23:56:00 +0000 (09:56 +1000)
https://bugs.freedesktop.org/show_bug.cgi?id=94097

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
src/evdev-mt-touchpad.c

index d8b23345e76b9d7f11c9bbe2488b8ff3ef5e0448..912a0f0f354d9b7b93ab76b21eae785c1c1381b6 100644 (file)
@@ -1991,17 +1991,28 @@ tp_init_hysteresis(struct tp_dispatch *tp)
 {
        int res_x, res_y;
 
+       if (tp->device->model_flags & EVDEV_MODEL_CYAPA)
+               goto want_hysteresis;
+
+       if (tp->device->model_flags & EVDEV_MODEL_ALPS_RUSHMORE)
+               goto want_hysteresis;
+
+       if (tp->semi_mt &&
+           (tp->device->model_flags & EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD))
+               goto want_hysteresis;
+
+       tp->hysteresis_margin.x = 0;
+       tp->hysteresis_margin.y = 0;
+
+       return;
+
+want_hysteresis:
        res_x = tp->device->abs.absinfo_x->resolution;
        res_y = tp->device->abs.absinfo_y->resolution;
 
-       if (tp->device->model_flags &
-           (EVDEV_MODEL_CYAPA|EVDEV_MODEL_ALPS_RUSHMORE)) {
-               tp->hysteresis_margin.x = res_x/2;
-               tp->hysteresis_margin.y = res_y/2;
-       } else {
-               tp->hysteresis_margin.x = 0;
-               tp->hysteresis_margin.y = 0;
-       }
+       tp->hysteresis_margin.x = res_x/2;
+       tp->hysteresis_margin.y = res_y/2;
+       return;
 }
 
 static int