From 609e367b3ee2b587f698b65393aa22357f453add Mon Sep 17 00:00:00 2001 From: Chase Douglas Date: Fri, 25 Feb 2011 02:12:32 +0100 Subject: Fix tap event leakage As an earlier stabilizing measure, very short taps were not registered as such but discarded, potentially letting the touch information through as non-gesture events. This should rather be handled in utouch-frame, and thus the code his dropped here. [rydberg@euromail.se: folded in unused code removal] Signed-off-by: Chase Douglas Signed-off-by: Henrik Rydberg --- src/gestures-tapping.c | 9 +-------- src/grail-gestures.h | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/gestures-tapping.c b/src/gestures-tapping.c index 6d71642..9abb6dc 100644 --- a/src/gestures-tapping.c +++ b/src/gestures-tapping.c @@ -23,9 +23,6 @@ #include "grail-recognizer.h" #include -static const int TAP_MIN_GAP_MS = 25; -static const int TAP_MIN_UP_MS = 200; - static const int fm_mask = 0x07; static void set_props(const struct gesture_inserter *gin, @@ -45,10 +42,7 @@ int gru_tapping(struct grail *ge, struct gesture_recognizer *gru = ge->gru; struct tapping_model *state = &gru->tapping; struct move_model *move = &gru->move; - grail_time_t up = move->time - state->end; state->tap = 0; - if (move->ntouch && move->ntouch < state->mintouch) - state->end = move->time; if (move->ntouch > state->maxtouch) { if (state->active) { gin_gid_discard(ge, state->gid); @@ -73,8 +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 || t > move->fm[FM_X].bar_ms || - up < TAP_MIN_UP_MS) { + if (t > move->fm[FM_X].bar_ms) { gin_gid_discard(ge, state->gid); state->mintouch = move->ntouch; state->maxtouch = move->ntouch; diff --git a/src/grail-gestures.h b/src/grail-gestures.h index 69dd7e4..a6d51d5 100644 --- a/src/grail-gestures.h +++ b/src/grail-gestures.h @@ -97,7 +97,7 @@ int gru_winrotate(struct grail *ge, const struct utouch_frame *frame); struct tapping_model { - grail_time_t start, end; + grail_time_t start; int mintouch, maxtouch; int active, gid, tap; int nprop; -- cgit v1.2.3