summaryrefslogtreecommitdiff
path: root/src/gestures-pinch.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-pinch.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-pinch.c')
-rw-r--r--src/gestures-pinch.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gestures-pinch.c b/src/gestures-pinch.c
index fa8a626..e022e8d 100644
--- a/src/gestures-pinch.c
+++ b/src/gestures-pinch.c
@@ -62,6 +62,13 @@ int gru_pinch(struct grail *ge,
62 } 62 }
63 return 0; 63 return 0;
64 } 64 }
65 if ((move->timeout & fm_mask) == fm_mask) {
66 if (state->active) {
67 gin_gid_discard(ge, state->gid);
68 state->active = 0;
69 }
70 return 0;
71 }
65 if (!(move->tickle & mask)) 72 if (!(move->tickle & mask))
66 return 0; 73 return 0;
67 if (!state->active) { 74 if (!state->active) {
@@ -93,6 +100,13 @@ int gru_winpinch(struct grail *ge,
93 } 100 }
94 return 0; 101 return 0;
95 } 102 }
103 if ((move->timeout & fm_mask) == fm_mask) {
104 if (state->active) {
105 gin_gid_discard(ge, state->gid);
106 state->active = 0;
107 }
108 return 0;
109 }
96 if (!(move->tickle & mask)) 110 if (!(move->tickle & mask))
97 return 0; 111 return 0;
98 if (!state->active) { 112 if (!state->active) {