[PATCH 12/23] Update count_packet_finger in store_history, not get_delta
Daniel Stone
daniel at fooishbar.org
Thu Jun 23 15:12:47 PDT 2011
Seems more sensible to update the count of packets in the history when
we update the history, rather than somewhere else entirely.
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
src/synaptics.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/synaptics.c b/src/synaptics.c
index 11a1584..2e6c0ed 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1694,6 +1694,8 @@ store_history(SynapticsPrivate *priv, int x, int y, CARD32 millis)
priv->move_hist[idx].y = y;
priv->move_hist[idx].millis = millis;
priv->hist_index = idx;
+ if (priv->count_packet_finger < SYNAPTICS_MOVE_HISTORY)
+ priv->count_packet_finger++;
}
/*
@@ -1857,15 +1859,13 @@ ComputeDeltas(SynapticsPrivate *priv, const struct SynapticsHwState *hw,
delay = MIN(delay, POLL_MS);
if (priv->count_packet_finger <= 3) /* min. 3 packets, see get_delta() */
- goto skip; /* skip the lot */
+ goto out; /* skip the lot */
if (priv->moving_state == MS_TRACKSTICK)
get_delta_for_trackstick(priv, hw, &dx, &dy);
else if (moving_state == MS_TOUCHPAD_RELATIVE)
get_delta(priv, hw, edge, &dx, &dy);
-skip:
- priv->count_packet_finger++;
out:
priv->prevFingers = hw->numFingers;
--
1.7.5.4
More information about the xorg-devel
mailing list