diff options
Diffstat (limited to 'src/gestures-tapping.c')
| -rw-r--r-- | src/gestures-tapping.c | 9 |
1 files changed, 1 insertions, 8 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 @@ | |||
| 23 | #include "grail-recognizer.h" | 23 | #include "grail-recognizer.h" |
| 24 | #include <math.h> | 24 | #include <math.h> |
| 25 | 25 | ||
| 26 | static const int TAP_MIN_GAP_MS = 25; | ||
| 27 | static const int TAP_MIN_UP_MS = 200; | ||
| 28 | |||
| 29 | static const int fm_mask = 0x07; | 26 | static const int fm_mask = 0x07; |
| 30 | 27 | ||
| 31 | static void set_props(const struct gesture_inserter *gin, | 28 | static void set_props(const struct gesture_inserter *gin, |
| @@ -45,10 +42,7 @@ int gru_tapping(struct grail *ge, | |||
| 45 | struct gesture_recognizer *gru = ge->gru; | 42 | struct gesture_recognizer *gru = ge->gru; |
| 46 | struct tapping_model *state = &gru->tapping; | 43 | struct tapping_model *state = &gru->tapping; |
| 47 | struct move_model *move = &gru->move; | 44 | struct move_model *move = &gru->move; |
| 48 | grail_time_t up = move->time - state->end; | ||
| 49 | state->tap = 0; | 45 | state->tap = 0; |
| 50 | if (move->ntouch && move->ntouch < state->mintouch) | ||
| 51 | state->end = move->time; | ||
| 52 | if (move->ntouch > state->maxtouch) { | 46 | if (move->ntouch > state->maxtouch) { |
| 53 | if (state->active) { | 47 | if (state->active) { |
| 54 | gin_gid_discard(ge, state->gid); | 48 | gin_gid_discard(ge, state->gid); |
| @@ -73,8 +67,7 @@ int gru_tapping(struct grail *ge, | |||
| 73 | int x = state->prop[GRAIL_PROP_TAP_X]; | 67 | int x = state->prop[GRAIL_PROP_TAP_X]; |
| 74 | int y = state->prop[GRAIL_PROP_TAP_Y]; | 68 | int y = state->prop[GRAIL_PROP_TAP_Y]; |
| 75 | int t = move->time - state->start; | 69 | int t = move->time - state->start; |
| 76 | if (t < TAP_MIN_GAP_MS || t > move->fm[FM_X].bar_ms || | 70 | if (t > move->fm[FM_X].bar_ms) { |
| 77 | up < TAP_MIN_UP_MS) { | ||
| 78 | gin_gid_discard(ge, state->gid); | 71 | gin_gid_discard(ge, state->gid); |
| 79 | state->mintouch = move->ntouch; | 72 | state->mintouch = move->ntouch; |
| 80 | state->maxtouch = move->ntouch; | 73 | state->maxtouch = move->ntouch; |
