touchpad: Disable edge palm detection Apple touchpads
authorHector Martin <marcan@marcan.st>
Thu, 6 Apr 2023 06:33:42 +0000 (15:33 +0900)
committerHector Martin <marcan@marcan.st>
Thu, 6 Apr 2023 07:34:20 +0000 (16:34 +0900)
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>
src/evdev-mt-touchpad.c
test/litest.h

index e2ecdea7f978196039209530969d428dfe0ba2ee..5b040ce548f76676843ff4953877b1a4d702fba8 100644 (file)
@@ -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
index 951508314ad339a46374ba3fb9bbc2b011f25da7..457790b336b87afbb2e7b5c2a638fe14f972b7b3 100644 (file)
@@ -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);