summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-04-17 20:45:31 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-04-18 01:01:47 +0200
commit80483b5c06839ab57cbad314ae1adb692bfb59da (patch)
tree007d6834f3401083fa3e66208791a0541f418b45 /src
parentc63075febe60edc81d39bab22a77684df129a67d (diff)
Correctly report zero fingers
This bug has been around since before alpha1, and yet the topic of commit c7ed4c, prior to alpha1, was about precisely this; With the bug, the last tracking id will sometimes be continued with a new touch, resulting in a cursor jump. This patch correctly sets zero fingers in HWData after receiving a zero-finger event. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src')
-rw-r--r--src/hwdata.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hwdata.c b/src/hwdata.c
index d696e07..9ec6241 100644
--- a/src/hwdata.c
+++ b/src/hwdata.c
@@ -40,7 +40,7 @@ static void accept_finger(struct HWData *hw)
GETBIT(hw->mread[hw->nread], BIT_MT_POSITION_X) &&
GETBIT(hw->mread[hw->nread], BIT_MT_POSITION_Y)) {
hw->mask[hw->nread] = hw->mread[hw->nread];
- hw->nfinger = ++hw->nread;
+ hw->nread++;
}
if (hw->nread < DIM_FINGER)
hw->mread[hw->nread] = 0;
@@ -49,6 +49,7 @@ static void accept_finger(struct HWData *hw)
static void accept_packet(struct HWData *hw, const struct timeval* tv)
{
static const mstime_t ms = 1000;
+ hw->nfinger = hw->nread;
hw->nread = 0;
hw->mread[hw->nread] = 0;
hw->evtime = tv->tv_usec / ms + tv->tv_sec * ms;