summaryrefslogtreecommitdiff
path: root/src/gestures-rotate.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2011-02-24 23:38:01 +0100
committerHenrik Rydberg <rydberg@euromail.se>2011-03-14 12:55:19 +0100
commitf92c18c344c04a2501e01ae402441a92883da382 (patch)
treefec506ca8784002083babe767505930be2a8d25a /src/gestures-rotate.c
parent609e367b3ee2b587f698b65393aa22357f453add (diff)
Introduce gesture timeouts
The timeout of a gesture is integral to the gesture type. This patch introduces timeout per gesture type, potentially enabling more control over gesture timing aspects. The timeout logic replaces the recently added recognition state. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/gestures-rotate.c')
-rw-r--r--src/gestures-rotate.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gestures-rotate.c b/src/gestures-rotate.c
index fde0db8..dd95c32 100644
--- a/src/gestures-rotate.c
+++ b/src/gestures-rotate.c
@@ -61,6 +61,13 @@ int gru_rotate(struct grail *ge,
61 } 61 }
62 return 0; 62 return 0;
63 } 63 }
64 if ((move->timeout & fm_mask) == fm_mask) {
65 if (state->active) {
66 gin_gid_discard(ge, state->gid);
67 state->active = 0;
68 }
69 return 0;
70 }
64 if (!(move->tickle & mask)) 71 if (!(move->tickle & mask))
65 return 0; 72 return 0;
66 if (!state->active) { 73 if (!state->active) {
@@ -92,6 +99,13 @@ int gru_winrotate(struct grail *ge,
92 } 99 }
93 return 0; 100 return 0;
94 } 101 }
102 if ((move->timeout & fm_mask) == fm_mask) {
103 if (state->active) {
104 gin_gid_discard(ge, state->gid);
105 state->active = 0;
106 }
107 return 0;
108 }
95 if (!(move->tickle & mask)) 109 if (!(move->tickle & mask))
96 return 0; 110 return 0;
97 if (!state->active) { 111 if (!state->active) {