From a8e7fd4304f4ad5e23014a04ad95e4b799c58a53 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Thu, 24 Feb 2011 22:04:47 +0100 Subject: Reset tap state after timeout A touch and hold will not properly reset the tap state, such that the next tap fails to register. Fixed with this patch. Signed-off-by: Henrik Rydberg --- src/gestures-tapping.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gestures-tapping.c') diff --git a/src/gestures-tapping.c b/src/gestures-tapping.c index 9abb6dc..24ddf1a 100644 --- a/src/gestures-tapping.c +++ b/src/gestures-tapping.c @@ -43,6 +43,10 @@ int gru_tapping(struct grail *ge, struct tapping_model *state = &gru->tapping; struct move_model *move = &gru->move; state->tap = 0; + if (frame->num_active && !frame->prev->num_active) { + state->mintouch = 0; + state->maxtouch = 0; + } if (move->ntouch > state->maxtouch) { if (state->active) { gin_gid_discard(ge, state->gid); @@ -89,6 +93,8 @@ int gru_tapping(struct grail *ge, if ((move->active & fm_mask) || move->time - state->start > move->fm[FM_X].bar_ms) { gin_gid_discard(ge, state->gid); + state->mintouch = move->ntouch; + state->maxtouch = move->ntouch; state->active = 0; } return 0; -- cgit v1.2.3