From 7b0780d4ce5e160381eb1ed4b79ec8698a03cc36 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 2 Mar 2017 16:06:51 +1000 Subject: [PATCH libinput] touchpad: set apple-specific pressure values Recordings in bug 96409 show a couple of spikes in the 60-70 range but they appear to be ghost touches according to the comment. The main touch range starts at 115, so we may need to increase this in the future. For comparison, synaptics used the same values. https://bugs.freedesktop.org/show_bug.cgi?id=96409 Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index c8e434e..2b80ac4 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -2382,9 +2382,14 @@ tp_init_pressure(struct tp_dispatch *tp, range = abs->maximum - abs->minimum; - /* Approximately the synaptics defaults */ - tp->pressure.high = abs->minimum + 0.12 * range; - tp->pressure.low = abs->minimum + 0.10 * range; + if (device->model_flags & EVDEV_MODEL_APPLE_TOUCHPAD) { + tp->pressure.high = 75; + tp->pressure.low = 70; + } else { + /* Approximately the synaptics defaults */ + tp->pressure.high = abs->minimum + 0.12 * range; + tp->pressure.low = abs->minimum + 0.10 * range; + } evdev_log_debug(device, "using pressure-based touch detection\n", -- 2.9.3