touchpad: disable gestures on Synaptics semi-mt touchpads
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 30 Jul 2015 01:07:58 +0000 (11:07 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 3 Aug 2015 01:40:17 +0000 (11:40 +1000)
Follow-up to eb146677e, if we disable 2fg scrolling on those touchpads we
should also disable gestures. The data doesn't magically become more useful.

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

index da03c262690cb1d2579f9f5a310afb1049eb1cd2..14821362136c85ce3ea859a6c43eda74ff9b2652 100644 (file)
@@ -565,7 +565,11 @@ tp_gesture_handle_state(struct tp_dispatch *tp, uint64_t time)
 int
 tp_init_gesture(struct tp_dispatch *tp)
 {
-       tp->gesture.enabled = true;
+       if (tp->device->model_flags & EVDEV_MODEL_JUMPING_SEMI_MT)
+               tp->gesture.enabled = false;
+       else
+               tp->gesture.enabled = true;
+
        tp->gesture.twofinger_state = GESTURE_2FG_STATE_NONE;
 
        libinput_timer_init(&tp->gesture.finger_count_switch_timer,
index 3b7ba7bfa8579501bf603a582e780205e1f665a2..9e4472487b87e87448ff8f0262957b6fc7b7bbb6 100644 (file)
@@ -34,8 +34,12 @@ START_TEST(gestures_cap)
        struct litest_device *dev = litest_current_device();
        struct libinput_device *device = dev->libinput_device;
 
-       ck_assert(libinput_device_has_capability(device,
-                                                LIBINPUT_DEVICE_CAP_GESTURE));
+       if (litest_is_synaptics_semi_mt(dev))
+               ck_assert(!libinput_device_has_capability(device,
+                                         LIBINPUT_DEVICE_CAP_GESTURE));
+       else
+               ck_assert(libinput_device_has_capability(device,
+                                        LIBINPUT_DEVICE_CAP_GESTURE));
 }
 END_TEST