summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2022-11-23 08:48:55 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2023-01-16 14:48:54 +1000
commitca17599727149ecdf1d686cf6ed3d462e7cdce46 (patch)
tree5eef149eb17fb31d3b336650b3f10bd4f4b72f38
parent0f8a5cab4ad0ed90a27c8019aa88c7b4d5027666 (diff)
downloadlibinput-ca17599727149ecdf1d686cf6ed3d462e7cdce46.tar.gz
tablet: increase touch arbitration rectangle height
A user was experiencing issues with their hand being recognized as touch input above the stylus tip. Since touch above the stylus should be rare, increase the touch arbitration rectangle height by 50mm. Fix: https://gitlab.freedesktop.org/libinput/libinput/-/issues/809 Signed-off-by: José Expósito <jose.exposito89@gmail.com> (cherry picked from commit 96e57b5eff18a18481c908df32db524f43ae0162)
-rw-r--r--src/evdev-tablet.c8
-rw-r--r--test/test-tablet.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 68c3c3e4..87d018fa 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -1501,8 +1501,8 @@ tablet_calculate_arbitration_rect(struct tablet_dispatch *tablet)
mm = evdev_device_units_to_mm(device, &tablet->axes.point);
- /* The rect we disable is 20mm left of the tip, 50mm north of the
- * tip, and 200x200mm large.
+ /* The rect we disable is 20mm left of the tip, 100mm north of the
+ * tip, and 200x250mm large.
* If the stylus is tilted left (tip further right than the eraser
* end) assume left-handed mode.
*
@@ -1523,8 +1523,8 @@ tablet_calculate_arbitration_rect(struct tablet_dispatch *tablet)
r.x = 0;
}
- r.y = mm.y - 50;
- r.h = 200;
+ r.y = mm.y - 100;
+ r.h = 250;
if (r.y < 0) {
r.h -= r.y;
r.y = 0;
diff --git a/test/test-tablet.c b/test/test-tablet.c
index 098c9e56..2a6e0731 100644
--- a/test/test-tablet.c
+++ b/test/test-tablet.c
@@ -4891,7 +4891,7 @@ START_TEST(touch_arbitration_outside_rect)
return;
x = 20;
- y = 45;
+ y = 70;
/* disable prox-out timer quirk */
litest_tablet_proximity_in(dev, x, y - 1, axes);
@@ -4912,7 +4912,7 @@ START_TEST(touch_arbitration_outside_rect)
litest_assert_touch_sequence(li);
/* above rect */
- litest_touch_sequence(finger, 0, x + 2, y - 35, x + 20, y - 10, 3);
+ litest_touch_sequence(finger, 0, x + 2, y - 65, x + 20, y - 40, 3);
libinput_dispatch(li);
litest_assert_touch_sequence(li);