diff options
| -rw-r--r-- | src/gestures-tapping.c | 6 |
1 files changed, 6 insertions, 0 deletions
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, | |||
| 43 | struct tapping_model *state = &gru->tapping; | 43 | struct tapping_model *state = &gru->tapping; |
| 44 | struct move_model *move = &gru->move; | 44 | struct move_model *move = &gru->move; |
| 45 | state->tap = 0; | 45 | state->tap = 0; |
| 46 | if (frame->num_active && !frame->prev->num_active) { | ||
| 47 | state->mintouch = 0; | ||
| 48 | state->maxtouch = 0; | ||
| 49 | } | ||
| 46 | if (move->ntouch > state->maxtouch) { | 50 | if (move->ntouch > state->maxtouch) { |
| 47 | if (state->active) { | 51 | if (state->active) { |
| 48 | gin_gid_discard(ge, state->gid); | 52 | gin_gid_discard(ge, state->gid); |
| @@ -89,6 +93,8 @@ int gru_tapping(struct grail *ge, | |||
| 89 | if ((move->active & fm_mask) || | 93 | if ((move->active & fm_mask) || |
| 90 | move->time - state->start > move->fm[FM_X].bar_ms) { | 94 | move->time - state->start > move->fm[FM_X].bar_ms) { |
| 91 | gin_gid_discard(ge, state->gid); | 95 | gin_gid_discard(ge, state->gid); |
| 96 | state->mintouch = move->ntouch; | ||
| 97 | state->maxtouch = move->ntouch; | ||
| 92 | state->active = 0; | 98 | state->active = 0; |
| 93 | } | 99 | } |
| 94 | return 0; | 100 | return 0; |
