summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grail-inserter.c9
-rw-r--r--src/grail-inserter.h2
2 files changed, 11 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)
diff --git a/src/grail-inserter.h b/src/grail-inserter.h
index 3b8cd77..fb944dd 100644
--- a/src/grail-inserter.h
+++ b/src/grail-inserter.h
@@ -53,6 +53,8 @@ struct gesture_inserter {
53 grail_mask_t used[DIM_INSTANCE_BYTES]; 53 grail_mask_t used[DIM_INSTANCE_BYTES];
54 grail_time_t time; 54 grail_time_t time;
55 int gestureid; 55 int gestureid;
56 int grab_active;
57 int grab_client;
56 float scale_x, scale_y, scale_r; 58 float scale_x, scale_y, scale_r;
57 float trans_x, trans_y; 59 float trans_x, trans_y;
58}; 60};