51 lines
1.6 KiB
Diff
51 lines
1.6 KiB
Diff
|
From 4a8b5e6ec445b507fc0b1ef9842a60bf13c58772 Mon Sep 17 00:00:00 2001
|
||
|
From: Hector Martin <marcan@marcan.st>
|
||
|
Date: Thu, 6 Apr 2023 15:33:42 +0900
|
||
|
Subject: [PATCH] touchpad: Disable edge palm detection Apple touchpads
|
||
|
|
||
|
This hurts more than it helps, and users complain of dead trackpad
|
||
|
edges. Apple touchpads have fairly sophisticated internal palm rejection
|
||
|
algorithms going back many years, so let's just disable this one on
|
||
|
everything Apple.
|
||
|
|
||
|
Related to: #433 (need to figure out what other hardware may need this)
|
||
|
|
||
|
Signed-off-by: Hector Martin <marcan@marcan.st>
|
||
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||
|
---
|
||
|
src/evdev-mt-touchpad.c | 4 ++++
|
||
|
test/litest.h | 2 +-
|
||
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
|
||
|
index e2ecdea7..5b040ce5 100644
|
||
|
--- a/src/evdev-mt-touchpad.c
|
||
|
+++ b/src/evdev-mt-touchpad.c
|
||
|
@@ -3350,6 +3350,10 @@ tp_init_palmdetect_edge(struct tp_dispatch *tp,
|
||
|
!tp_is_tpkb_combo_below(device))
|
||
|
return;
|
||
|
|
||
|
+ /* Edge palm detection hurts more than it helps on Apple touchpads. */
|
||
|
+ if (evdev_device_has_model_quirk(device, QUIRK_MODEL_APPLE_TOUCHPAD))
|
||
|
+ return;
|
||
|
+
|
||
|
evdev_device_get_size(device, &width, &height);
|
||
|
|
||
|
/* Enable edge palm detection on touchpads >= 70 mm. Anything
|
||
|
diff --git a/test/litest.h b/test/litest.h
|
||
|
index 95150831..457790b3 100644
|
||
|
--- a/test/litest.h
|
||
|
+++ b/test/litest.h
|
||
|
@@ -1287,7 +1287,7 @@ litest_has_palm_detect_size(struct litest_device *dev)
|
||
|
if (bustype == BUS_BLUETOOTH)
|
||
|
return 0;
|
||
|
if (vendor == VENDOR_ID_APPLE)
|
||
|
- return 1;
|
||
|
+ return 0;
|
||
|
|
||
|
rc = libinput_device_get_size(dev->libinput_device, &width, &height);
|
||
|
|
||
|
--
|
||
|
2.40.0
|
||
|
|