From 52aeefd3f462955063faae58f14097a7be88a558 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Thu, 9 Sep 2010 20:59:35 +0200 Subject: Discard tapping even when there are zero events between down and up The current logic assumes there will be at least one frame with between touch up and touch down or the tap will not be properly timed out. Fixed with this patch. Reported-by: Chase Douglas Signed-off-by: Henrik Rydberg --- src/gestures-tapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gestures-tapping.c b/src/gestures-tapping.c index fe7b7fe..b2acae8 100644 --- a/src/gestures-tapping.c +++ b/src/gestures-tapping.c @@ -67,7 +67,7 @@ int gru_tapping(struct grail *ge, int x = state->prop[GRAIL_PROP_TAP_X]; int y = state->prop[GRAIL_PROP_TAP_Y]; int t = move->time - state->start; - if (t < TAP_MIN_GAP_MS) { + if (t < TAP_MIN_GAP_MS || t > move->fm[FM_X].bar_ms) { gin_gid_discard(ge, state->gid); state->ntouch = move->ntouch; state->active = 0; -- cgit v1.2.3