summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/synaptics.c3
-rw-r--r--src/synapticsstr.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 9d0bf14..1184f30 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1724,7 +1724,7 @@ ComputeDeltas(SynapticsPrivate *priv, const struct SynapticsHwState *hw,
if (inside_area && moving_state && !priv->palm &&
!priv->vert_scroll_edge_on && !priv->horiz_scroll_edge_on &&
!priv->vert_scroll_twofinger_on && !priv->horiz_scroll_twofinger_on &&
- !priv->circ_scroll_on) {
+ !priv->circ_scroll_on && priv->prevFingers == hw->numFingers) {
/* FIXME: Wtf?? what's with 13? */
delay = MIN(delay, 13);
if (priv->count_packet_finger > 3) { /* min. 3 packets */
@@ -1794,6 +1794,7 @@ ComputeDeltas(SynapticsPrivate *priv, const struct SynapticsHwState *hw,
} else { /* reset packet counter */
priv->count_packet_finger = 0;
}
+ priv->prevFingers = hw->numFingers;
*dxP = dx;
*dyP = dy;
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index b4a72aa..caa0476 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -218,6 +218,7 @@ typedef struct _SynapticsPrivateRec
int palm; /* Set to true when palm detected, reset to false when
palm/finger contact disappears */
int prev_z; /* previous z value, for palm detection */
+ int prevFingers; /* previous numFingers, for transition detection */
int avg_width; /* weighted average of previous fingerWidth values */
double horiz_coeff; /* normalization factor for x coordintes */
double vert_coeff; /* normalization factor for y coordintes */