summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-03-21 12:58:30 -0700
committerPeter Hutterer <peter.hutterer@who-t.net>2012-03-22 14:31:32 +1000
commitb3348eb7e4e2187e11aa3c1cec2a58512759e6aa (patch)
tree31b9468cf4d97db670292e106eb79ba16637f572
parenteba82d203e5e817a61180c6510d8de0d063ed05d (diff)
Include open but unchanged touches when guessing clickfingers
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@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/synaptics.c7
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];