summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriele Mazzotta <gabriele.mzt@gmail.com>2014-07-27 12:58:18 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2014-08-28 10:28:50 +1000
commita028ceb894ca3959dd32d83bc8226b5b0b05f9df (patch)
tree3307071b03b6f467835200a23a1f6cda144235c3
parente57b219a8c3b70433988f0b894a182cee0ef5736 (diff)
Prevent two-finger taps from being ignored
When two fingers are used, the coordinates of only one of them is taken into account. This can lead to sudden variations of the absolute coordinates when two-fingers taps are performed if the finger considered changes. Take into account coordinates variations to prevent unwanted taps only if the number of fingers doesn't change. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 7d0ff39519e4d3760722b914883bee276035061c)
-rw-r--r--src/synaptics.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index a8784f9..8a51754 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1945,8 +1945,9 @@ HandleTapProcessing(SynapticsPrivate * priv, struct SynapticsHwState *hw,
(priv->tap_max_fingers <=
((priv->horiz_scroll_twofinger_on ||
priv->vert_scroll_twofinger_on) ? 2 : 1)) &&
- ((abs(hw->x - priv->touch_on.x) >= para->tap_move) ||
- (abs(hw->y - priv->touch_on.y) >= para->tap_move)));
+ (priv->prevFingers == hw->numFingers &&
+ ((abs(hw->x - priv->touch_on.x) >= para->tap_move) ||
+ (abs(hw->y - priv->touch_on.y) >= para->tap_move))));
press = (hw->left || hw->right || hw->middle);
if (touch) {