summaryrefslogtreecommitdiff
path: root/src/grail-inserter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/grail-inserter.c')
-rw-r--r--src/grail-inserter.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/grail-inserter.c b/src/grail-inserter.c
index 6f9a034..ff4f0b6 100644
--- a/src/grail-inserter.c
+++ b/src/grail-inserter.c
@@ -69,6 +69,13 @@ static void setup_new_gestures(struct grail *ge,
69 for (j = 0; j < nclient; j++) { 69 for (j = 0; j < nclient; j++) {
70 if (!grail_mask_get(info[j].mask, s->type)) 70 if (!grail_mask_get(info[j].mask, s->type))
71 continue; 71 continue;
72 if (gin->grab_active &&
73 info[j].id.client != gin->grab_client)
74 continue;
75 if (grail_mask_get(info[j].mask, GRAIL_TYPE_SYSFLAG1)) {
76 gin->grab_active = 1;
77 gin->grab_client = info[j].id.client;
78 }
72 s->client_id[s->nclient++] = info[j].id; 79 s->client_id[s->nclient++] = info[j].id;
73 } 80 }
74 } 81 }
@@ -105,6 +112,8 @@ void gin_frame_begin(struct grail *ge, const struct utouch_frame *frame)
105 struct gesture_inserter *gin = ge->gin; 112 struct gesture_inserter *gin = ge->gin;
106 memset(gin->types, 0, sizeof(gin->types)); 113 memset(gin->types, 0, sizeof(gin->types));
107 gin->time = frame->time; 114 gin->time = frame->time;
115 if (frame->num_active && !frame->prev->num_active)
116 gin->grab_active = 0;
108} 117}
109 118
110void gin_frame_end(struct grail *ge, const struct utouch_frame *frame) 119void gin_frame_end(struct grail *ge, const struct utouch_frame *frame)