diff options
author | Daniel Stone <daniel@fooishbar.org> | 2011-06-14 17:41:58 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-08-25 09:50:33 +1000 |
commit | ffed18dfffda32de7282e44c5b8d1fb7d5454b54 (patch) | |
tree | 54a21a2d80d5644d0f581d97fb755cf580d18349 | |
parent | c8b098214b44cf0585d78c460401ea7d143769f3 (diff) |
Update count_packet_finger in store_history, not get_delta
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@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/synaptics.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/synaptics.c b/src/synaptics.c index 9a651b3..ac6ef02 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -1683,6 +1683,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++; } /* @@ -1846,15 +1848,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; |