diff options
Diffstat (limited to 'src/gestures-pinch.c')
| -rw-r--r-- | src/gestures-pinch.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gestures-pinch.c b/src/gestures-pinch.c index 48e72bd..6c5392d 100644 --- a/src/gestures-pinch.c +++ b/src/gestures-pinch.c | |||
| @@ -33,7 +33,7 @@ int gru_pinch(struct grail *ge, | |||
| 33 | struct combo_model *state = &gru->pinch; | 33 | struct combo_model *state = &gru->pinch; |
| 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; |
| @@ -43,16 +43,11 @@ int gru_pinch(struct grail *ge, | |||
| 43 | if (!move->r.tickle) | 43 | if (!move->r.tickle) |
| 44 | return 0; | 44 | return 0; |
| 45 | if (!state->active) { | 45 | if (!state->active) { |
| 46 | switch(move->ntouch) { | 46 | int type = move->ntouch == 2 ? GRAIL_TYPE_PINCH : |
| 47 | case 2: | 47 | move->ntouch == 3 ? GRAIL_TYPE_SCALE : 0; |
| 48 | state->gid = gin_gid_begin(ge, GRAIL_TYPE_PINCH, frame); | 48 | if (!type) |
| 49 | break; | ||
| 50 | case 3: | ||
| 51 | state->gid = gin_gid_begin(ge, GRAIL_TYPE_SCALE, frame); | ||
| 52 | break; | ||
| 53 | default: | ||
| 54 | return 0; | 49 | return 0; |
| 55 | } | 50 | state->gid = gin_gid_begin(ge, type, PRIO_GESTURE, frame); |
| 56 | state->active = 1; | 51 | state->active = 1; |
| 57 | } | 52 | } |
| 58 | if (!move->r.active) | 53 | if (!move->r.active) |
