summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-02-17 09:06:09 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-02-18 09:56:00 +1000
commitd6b889852abd3e5f238769be55cb4a30e5db6dcb (patch)
tree450f22ad41132886c2ee596ff7e70b83d63f64ea /src
parentcc0c3e85988c25b6f637d27979c93283b8224224 (diff)
touchpad: add synaptics semi-mt devices to those needing hysteresis
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>
Diffstat (limited to 'src')
-rw-r--r--src/evdev-mt-touchpad.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index d8b23345..912a0f0f 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -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