summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2015-11-09 16:21:36 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2015-11-16 09:17:25 +1000
commit09a296708aa291e0dd5ada2db14f288a3095b61e (patch)
tree71ee9648abb4d57f9e6d746ec762ab3021b98330
parent12e9a940b3ead32a6489170c1f234e66eb781147 (diff)
touchpad: reduced the 2fg scroll threshold to 1mm
At least on the t440, this is enough to trigger correct detection between pinch and scroll 90% of the time. Since scrolling is significantly more prevalent than gesturing, erring on the side of scrolling at the cost of misdetecting some gestures is acceptable. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--src/evdev-mt-touchpad-gestures.c2
-rw-r--r--test/gestures.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
index cc26e2a9..80aa89ff 100644
--- a/src/evdev-mt-touchpad-gestures.c
+++ b/src/evdev-mt-touchpad-gestures.c
@@ -195,7 +195,7 @@ tp_gesture_get_direction(struct tp_dispatch *tp, struct tp_touch *touch)
(tp->device->model_flags & EVDEV_MODEL_ELANTECH_TOUCHPAD) == 0)
move_threshold = TP_MM_TO_DPI_NORMALIZED(4);
else
- move_threshold = TP_MM_TO_DPI_NORMALIZED(2);
+ move_threshold = TP_MM_TO_DPI_NORMALIZED(1);
delta = device_delta(touch->point, touch->gesture.initial);
diff --git a/test/gestures.c b/test/gestures.c
index 9e447248..9fc73b97 100644
--- a/test/gestures.c
+++ b/test/gestures.c
@@ -294,13 +294,13 @@ START_TEST(gestures_spread)
for (i = 0; i < 15; i++) {
litest_push_event_frame(dev);
if (dir_x > 0.0)
- dir_x += 2;
+ dir_x += 1;
else if (dir_x < 0.0)
- dir_x -= 2;
+ dir_x -= 1;
if (dir_y > 0.0)
- dir_y += 2;
+ dir_y += 1;
else if (dir_y < 0.0)
- dir_y -= 2;
+ dir_y -= 1;
litest_touch_move(dev,
0,
50 + dir_x,