diff options
author | Gabriele Mazzotta <gabriele.mzt@gmail.com> | 2014-09-16 17:20:15 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2014-09-17 15:29:51 +1000 |
commit | a897147be04d74ed452cda166fd4e01f9615ff72 (patch) | |
tree | 266e1a1a73759070dd7860fb63b9d0b42ecbf99f /src/synaptics.c | |
parent | 41b2312c006fca1f24e1a366174d3203a63fa04a (diff) |
Use ABS_MT events for the palm detection when supported
Use ABS_MT_TOUCH_MAJOR and ABS_MT_PRESSURE instead of ABS_TOOL_WIDTH
and ABS_PRESSURE when supported so that the pressure and the width of
all the fingers is taken into account for the palm detection.
This also fixes the palm detection for those touchpads for which the
kernel only sends ABS_MT_TOUCH_MAJOR and not ABS_TOOL_WIDTH.
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/synaptics.c')
-rw-r--r-- | src/synaptics.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/synaptics.c b/src/synaptics.c index 756751d..9807439 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -1829,6 +1829,9 @@ SynapticsDetectFinger(SynapticsPrivate * priv, struct SynapticsHwState *hw) if ((hw->z > para->palm_min_z) && (hw->fingerWidth > para->palm_min_width)) return FS_BLOCKED; + if (priv->has_touch) + return finger; + if (hw->x == 0 || priv->finger_state == FS_UNTOUCHED) priv->avg_width = 0; else |