[PATCH libinput 4/6] touchpad: disable gestures on Synaptics semi-mt touchpads

Peter Hutterer peter.hutterer at who-t.net
Wed Jul 29 23:11:55 PDT 2015


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 at who-t.net>
---
 src/evdev-mt-touchpad-gestures.c | 6 +++++-
 test/gestures.c                  | 8 ++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
index da03c26..1482136 100644
--- a/src/evdev-mt-touchpad-gestures.c
+++ b/src/evdev-mt-touchpad-gestures.c
@@ -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,
diff --git a/test/gestures.c b/test/gestures.c
index 3b7ba7b..9e44724 100644
--- a/test/gestures.c
+++ b/test/gestures.c
@@ -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
 
-- 
2.4.3



More information about the wayland-devel mailing list