From 3b776917d8037bec30a62b802433194ecead929f Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Thu, 26 Aug 2010 16:16:22 +0200 Subject: Plug hole in tentative gestures state during finger transition During finger configuration transition, as well as after a tap, there would be no tentative gestures registered in the instantiator, leading to faulty emission of motion events. Fixed with this patch. Signed-off-by: Henrik Rydberg --- src/gestures-drag.c | 10 ++++------ src/grail-inserter.c | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/gestures-drag.c b/src/gestures-drag.c index 8b57b99..2ced765 100644 --- a/src/gestures-drag.c +++ b/src/gestures-drag.c @@ -71,10 +71,7 @@ int gru_drag(struct grail *ge, state->prop, state->nprop); state->active = 0; } - return 0; } - if (!(move->tickle & mask)) - return 0; if (!state->active) { int type = getype[move->ntouch]; if (type < 0) @@ -82,6 +79,8 @@ int gru_drag(struct grail *ge, state->gid = gin_gid_begin(ge, type, PRIO_GESTURE, frame); state->active = 1; } + if (!(move->tickle & mask)) + return 0; if (!move->single && !(move->active & fm_mask)) return 0; set_props(ge->gin, state, move, frame); @@ -102,10 +101,7 @@ int gru_windrag(struct grail *ge, state->prop, state->nprop); state->active = 0; } - return 0; } - if (!(move->tickle & mask)) - return 0; if (!state->active) { if (move->ntouch == 4) { state->gid = gin_gid_begin(ge, GRAIL_TYPE_MDRAG, @@ -123,6 +119,8 @@ int gru_windrag(struct grail *ge, return 0; } } + if (!(move->tickle & mask)) + return 0; if (!move->single && !(move->active & fm_mask)) return 0; set_props(ge->gin, state, move, frame); diff --git a/src/grail-inserter.c b/src/grail-inserter.c index d77da79..a54b73a 100644 --- a/src/grail-inserter.c +++ b/src/grail-inserter.c @@ -125,7 +125,7 @@ void gin_frame_end(struct grail *ge, continue; if (s->priority > hold) hold = s->priority; - if (s->status == GRAIL_STATUS_BEGIN) + if (s->status != GRAIL_STATUS_UPDATE) continue; if (s->priority > discard) discard = s->priority; -- cgit v1.2.3