[PATCH synaptics v2 13/21] Update count_packet_finger in store_history, not get_delta

Daniel Stone daniel at fooishbar.org
Tue Jun 14 10:06:01 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(-)

v2: New; split out from regress() addition.

diff --git a/src/synaptics.c b/src/synaptics.c
index 00d51fe..23751f4 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1713,6 +1713,8 @@ store_history(SynapticsPrivate *priv, int x, int y, unsigned long 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++;
 }
 
 /*
@@ -1876,15 +1878,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.3



More information about the xorg-devel mailing list