[PATCH xf86-input-synaptics 4/4] Include open but unchanged touches when guessing clickfingers

Chase Douglas chase.douglas at canonical.com
Wed Mar 21 12:58:30 PDT 2012


On a clickpad, when the button is pressed the clickfinger guessing will
only work properly if all touches have new data to report. If a touch
has not changed, then it will not be counted. This leads to inaccurate
finger counts.

This change ensures that all active touches are counted. Note that the X
and Y valuators of active but unchanged touches are still valid.

Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
 src/synaptics.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/synaptics.c b/src/synaptics.c
index e22929b..3c5b12d 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2600,8 +2600,8 @@ clickpad_guess_clickfingers(SynapticsPrivate *priv, struct SynapticsHwState *hw)
     for (i = 0; i < hw->num_mt_mask - 1; i++) {
         ValuatorMask *f1;
 
-        /* you can't click on open, you're not fast enough */
-        if (hw->slot_state[i] != SLOTSTATE_UPDATE)
+        if (hw->slot_state[i] == SLOTSTATE_EMPTY ||
+            hw->slot_state[i] == SLOTSTATE_CLOSE)
             continue;
 
         f1 = hw->mt_mask[i];
@@ -2610,7 +2610,8 @@ clickpad_guess_clickfingers(SynapticsPrivate *priv, struct SynapticsHwState *hw)
             ValuatorMask *f2;
             double x1, x2, y1, y2;
 
-            if (hw->slot_state[j] != SLOTSTATE_UPDATE)
+            if (hw->slot_state[j] == SLOTSTATE_EMPTY ||
+                hw->slot_state[j] == SLOTSTATE_CLOSE)
                 continue;
 
             f2 = hw->mt_mask[j];
-- 
1.7.9.1



More information about the xorg-devel mailing list