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.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/grail-inserter.c b/src/grail-inserter.c
index 1ee8e5a..5225cb8 100644
--- a/src/grail-inserter.c
+++ b/src/grail-inserter.c
@@ -143,6 +143,13 @@ void gin_frame_end(struct grail *ge, const struct utouch_frame *frame)
143 143
144 grail_mask_foreach(i, gin->used, sizeof(gin->used)) { 144 grail_mask_foreach(i, gin->used, sizeof(gin->used)) {
145 struct slot_state *s = &gin->state[i]; 145 struct slot_state *s = &gin->state[i];
146 if (!s->timeout)
147 continue;
148 gin_gid_discard(ge, s->id);
149 }
150
151 grail_mask_foreach(i, gin->used, sizeof(gin->used)) {
152 struct slot_state *s = &gin->state[i];
146 struct gesture_event ev; 153 struct gesture_event ev;
147 grail_mask_set(gin->types, s->type); 154 grail_mask_set(gin->types, s->type);
148 if (s->priority < hold[s->slice]) 155 if (s->priority < hold[s->slice])
@@ -178,6 +185,7 @@ int gin_gid_begin(struct grail *ge, int type, int priority,
178 s->priority = priority; 185 s->priority = priority;
179 s->slice = 0; 186 s->slice = 0;
180 } 187 }
188 s->timeout = 0;
181 s->id = gin->gestureid++ & MAX_GESTURE_ID; 189 s->id = gin->gestureid++ & MAX_GESTURE_ID;
182 s->status = GRAIL_STATUS_BEGIN; 190 s->status = GRAIL_STATUS_BEGIN;
183 s->nclient = 0; 191 s->nclient = 0;
@@ -204,6 +212,13 @@ void gin_gid_discard(struct grail *ge, int gid)
204 grail_mask_set(gin->unused, i); 212 grail_mask_set(gin->unused, i);
205} 213}
206 214
215void gin_gid_timeout(struct grail *ge, int gid)
216{
217 int i = find_gslot(ge->gin, gid);
218 if (i >= 0)
219 ge->gin->state[i].timeout = 1;
220}
221
207void gin_gid_event(struct grail *ge, int gid, 222void gin_gid_event(struct grail *ge, int gid,
208 float x, float y, int ntouch, 223 float x, float y, int ntouch,
209 const grail_prop_t *prop, int nprop, 224 const grail_prop_t *prop, int nprop,