From 5d7ec311cdef842e60756d9189d09e3814e4ad1d Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Fri, 25 Mar 2011 19:10:19 +0100 Subject: Decouple timeout from discard Move the actual gesture discard from the recognition phase to the instantiation phase. Signed-off-by: Henrik Rydberg --- src/gestures-drag.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/gestures-drag.c') diff --git a/src/gestures-drag.c b/src/gestures-drag.c index 9f2bcaf..962aa6d 100644 --- a/src/gestures-drag.c +++ b/src/gestures-drag.c @@ -74,10 +74,8 @@ int gru_drag(struct grail *ge, } if ((move->timeout & fm_mask) == fm_mask) { if (state->active) { - gin_gid_discard(ge, state->gid); - state->active = 0; + gin_gid_timeout(ge, state->gid); } - return 0; } if (!state->active) { int type = getype[move->ntouch]; @@ -111,10 +109,8 @@ int gru_windrag(struct grail *ge, } if ((move->timeout & fm_mask) == fm_mask) { if (state->active) { - gin_gid_discard(ge, state->gid); - state->active = 0; + gin_gid_timeout(ge, state->gid); } - return 0; } if (!state->active) { if (move->ntouch == 4) { -- cgit v1.2.3