diff options
Diffstat (limited to 'src/gestures-combo.c')
| -rw-r--r-- | src/gestures-combo.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gestures-combo.c b/src/gestures-combo.c index 8b4ad8c..7b8dbd5 100644 --- a/src/gestures-combo.c +++ b/src/gestures-combo.c | |||
| @@ -26,6 +26,15 @@ | |||
| 26 | #include <math.h> | 26 | #include <math.h> |
| 27 | #include <stdio.h> | 27 | #include <stdio.h> |
| 28 | 28 | ||
| 29 | static const int getype[DIM_TOUCH + 1] = { | ||
| 30 | 0, | ||
| 31 | 0, | ||
| 32 | GRAIL_TYPE_COMBO2, | ||
| 33 | GRAIL_TYPE_COMBO3, | ||
| 34 | GRAIL_TYPE_COMBO4, | ||
| 35 | GRAIL_TYPE_COMBO5, | ||
| 36 | }; | ||
| 37 | |||
| 29 | int gru_combo(struct grail *ge, | 38 | int gru_combo(struct grail *ge, |
| 30 | const struct touch_frame *frame) | 39 | const struct touch_frame *frame) |
| 31 | { | 40 | { |
| @@ -44,8 +53,7 @@ int gru_combo(struct grail *ge, | |||
| 44 | !move->r.tickle && !move->a.tickle) | 53 | !move->r.tickle && !move->a.tickle) |
| 45 | return 0; | 54 | return 0; |
| 46 | if (!state->active) { | 55 | if (!state->active) { |
| 47 | int type = move->ntouch == 2 ? GRAIL_TYPE_COMBO2 : | 56 | int type = getype[move->ntouch]; |
| 48 | move->ntouch == 3 ? GRAIL_TYPE_COMBO3 : 0; | ||
| 49 | if (!type) | 57 | if (!type) |
| 50 | return 0; | 58 | return 0; |
| 51 | state->gid = gin_gid_begin(ge, type, PRIO_GESTURE, frame); | 59 | state->gid = gin_gid_begin(ge, type, PRIO_GESTURE, frame); |
