diff options
| author | Henrik Rydberg <rydberg@bitmath.org> | 2010-08-04 22:06:54 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-08-05 22:48:38 +0200 |
| commit | 88dada465e0fad35b5a535a042e0a93046ffff7c (patch) | |
| tree | c191b61c7b55fb5cfb08b8baae6bc11a25062ca6 /src/gestures-combo.c | |
| parent | 697b5b5c7d2b1c46387061fcbed24cbee51d98ce (diff) | |
Cleanup tapping and gesture code
Improved tapping quality with this patch.
Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
Diffstat (limited to 'src/gestures-combo.c')
| -rw-r--r-- | src/gestures-combo.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gestures-combo.c b/src/gestures-combo.c index 82e7b42..8b4ad8c 100644 --- a/src/gestures-combo.c +++ b/src/gestures-combo.c | |||
| @@ -33,7 +33,7 @@ int gru_combo(struct grail *ge, | |||
| 33 | struct combo_model *state = &gru->combo; | 33 | struct combo_model *state = &gru->combo; |
| 34 | struct move_model *move = &gru->move; | 34 | struct move_model *move = &gru->move; |
| 35 | grail_prop_t prop[DIM_GRAIL_PROP]; | 35 | grail_prop_t prop[DIM_GRAIL_PROP]; |
| 36 | if (!move->motion) { | 36 | if (!move->multi) { |
| 37 | if (state->active) { | 37 | if (state->active) { |
| 38 | gru_end(ge, state->gid, move); | 38 | gru_end(ge, state->gid, move); |
| 39 | state->active = 0; | 39 | state->active = 0; |
| @@ -44,16 +44,11 @@ int gru_combo(struct grail *ge, | |||
| 44 | !move->r.tickle && !move->a.tickle) | 44 | !move->r.tickle && !move->a.tickle) |
| 45 | return 0; | 45 | return 0; |
| 46 | if (!state->active) { | 46 | if (!state->active) { |
| 47 | switch(move->ntouch) { | 47 | int type = move->ntouch == 2 ? GRAIL_TYPE_COMBO2 : |
| 48 | case 2: | 48 | move->ntouch == 3 ? GRAIL_TYPE_COMBO3 : 0; |
| 49 | state->gid = gin_gid_begin(ge, GRAIL_TYPE_COMBO2, frame); | 49 | if (!type) |
| 50 | break; | ||
| 51 | case 3: | ||
| 52 | state->gid = gin_gid_begin(ge, GRAIL_TYPE_COMBO3, frame); | ||
| 53 | break; | ||
| 54 | default: | ||
| 55 | return 0; | 50 | return 0; |
| 56 | } | 51 | state->gid = gin_gid_begin(ge, type, PRIO_GESTURE, frame); |
| 57 | state->active = 1; | 52 | state->active = 1; |
| 58 | } | 53 | } |
| 59 | if (!move->x.active && !move->y.active && | 54 | if (!move->x.active && !move->y.active && |
