summaryrefslogtreecommitdiff
path: root/src/gestures-rotate.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@bitmath.org>2010-08-04 22:06:54 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-08-05 22:48:38 +0200
commit88dada465e0fad35b5a535a042e0a93046ffff7c (patch)
treec191b61c7b55fb5cfb08b8baae6bc11a25062ca6 /src/gestures-rotate.c
parent697b5b5c7d2b1c46387061fcbed24cbee51d98ce (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-rotate.c')
-rw-r--r--src/gestures-rotate.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gestures-rotate.c b/src/gestures-rotate.c
index 011e9a0..90f9bdf 100644
--- a/src/gestures-rotate.c
+++ b/src/gestures-rotate.c
@@ -33,7 +33,7 @@ int gru_rotate(struct grail *ge,
33 struct combo_model *state = &gru->rotate; 33 struct combo_model *state = &gru->rotate;
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_rotate(struct grail *ge,
43 if (!move->a.tickle) 43 if (!move->a.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_ROTATE :
47 case 2: 47 move->ntouch == 3 ? GRAIL_TYPE_TURN : 0;
48 state->gid = gin_gid_begin(ge, GRAIL_TYPE_ROTATE, frame); 48 if (!type)
49 break;
50 case 3:
51 state->gid = gin_gid_begin(ge, GRAIL_TYPE_TURN, 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->a.active) 53 if (!move->a.active)