From 93d4a10726df4ae85931db80bc3a22e1929c3ef4 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Thu, 15 Apr 2010 19:33:39 +0200 Subject: Reset accumulated movement at finger configuration change This bug crept in during the transition of the movement code from position differencing to delta accumulation. If briefly touching the trackpad in motion, then placing the finger calmly at another point, a jittery motion would occur. Fixed with this patch. Signed-off-by: Henrik Rydberg --- src/gestures.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/gestures.c b/src/gestures.c index 277e864..432f3af 100644 --- a/src/gestures.c +++ b/src/gestures.c @@ -106,6 +106,8 @@ static void extract_movement(struct Gestures *gs, struct MTouch* mt) mt->mem.move_time += FINGER_ATTACK_MS; else mt->mem.move_time += FINGER_DECAY_MS; + memset(mt->mem.dx, 0, sizeof(mt->mem.dx)); + memset(mt->mem.dy, 0, sizeof(mt->mem.dy)); } else { for (i = 0; i < mt->state.nfinger; i++) { if (!GETBIT(mt->mem.pointing, i)) -- cgit v1.2.3