From f92c18c344c04a2501e01ae402441a92883da382 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Thu, 24 Feb 2011 23:38:01 +0100 Subject: 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 --- src/gestures-rotate.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/gestures-rotate.c') 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, } return 0; } + if ((move->timeout & fm_mask) == fm_mask) { + if (state->active) { + gin_gid_discard(ge, state->gid); + state->active = 0; + } + return 0; + } if (!(move->tickle & mask)) return 0; if (!state->active) { @@ -92,6 +99,13 @@ int gru_winrotate(struct grail *ge, } return 0; } + if ((move->timeout & fm_mask) == fm_mask) { + if (state->active) { + gin_gid_discard(ge, state->gid); + state->active = 0; + } + return 0; + } if (!(move->tickle & mask)) return 0; if (!state->active) { -- cgit v1.2.3