Merge lp:~oif-packaging/grail/packaging.touch-gestures into lp:grail/ubuntu

Proposed by Chase Douglas
Status: Merged
Merged at revision: 79
Proposed branch: lp:~oif-packaging/grail/packaging.touch-gestures
Merge into: lp:grail/ubuntu
Diff against target: 645 lines (+612/-0)
6 files modified
debian/changelog (+14/-0)
debian/patches/0001-set-proper-tap-properties.patch (+13/-0)
debian/patches/0002-disable-semi-mt-rotation.patch (+25/-0)
debian/patches/0003-add-touch-gestures.patch (+508/-0)
debian/patches/0004-dont-hold-back-active-gestures.patch (+48/-0)
debian/patches/series (+4/-0)
To merge this branch: bzr merge lp:~oif-packaging/grail/packaging.touch-gestures
Reviewer Review Type Date Requested Status
Duncan McGreggor (community) Approve
Henrik Rydberg (community) Approve
Review via email: mp+55235@code.launchpad.net

Description of the change

Includes three patches for the associated bugs:

* Prevent semi-mt rotation
* Add touch gestures
* Ensure gesture end events are sent

To post a comment you must log in.
Revision history for this message
Henrik Rydberg (rydberg) wrote :

We have reached consensus on everything but the much less important semi-mt change. I just cant be bothered with anymore discussions around it. Adding the disputed change to this critical set is bad style. Have fun with it.

review: Approve
84. By Chase Douglas

Fold in related fix to 0004-dont-hold-back-active-gestures.patch

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

I'm okay with bad style, if it's a bug fix. I can't think of a reason not to include this bug fix, so I'm +1'ing it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2011-03-09 17:14:52 +0000
+++ debian/changelog 2011-03-30 15:42:36 +0000
@@ -1,3 +1,17 @@
1utouch-grail (1.0.20-0ubuntu3) UNRELEASED; urgency=low
2
3 * Prevent rotation gestures on semi-mt trackpads (LP: #724979)
4 * Add touch gestures (LP: #742582)
5 * Ensure all started gestures end (LP: #744391)
6
7 -- Chase Douglas <chase.douglas@ubuntu.com> Mon, 28 Mar 2011 16:19:49 -0400
8
9utouch-grail (1.0.20-0ubuntu2) natty; urgency=low
10
11 * Show all properties on multitouch taps (LP: #742006)
12
13 -- Chase Douglas <chase.douglas@ubuntu.com> Thu, 24 Mar 2011 17:50:30 -0400
14
1utouch-grail (1.0.20-0ubuntu1) natty; urgency=low15utouch-grail (1.0.20-0ubuntu1) natty; urgency=low
216
3 [ Henrik Rydberg ]17 [ Henrik Rydberg ]
418
=== added directory 'debian/patches'
=== added file 'debian/patches/0001-set-proper-tap-properties.patch'
--- debian/patches/0001-set-proper-tap-properties.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/0001-set-proper-tap-properties.patch 2011-03-30 15:42:36 +0000
@@ -0,0 +1,13 @@
1=== modified file 'src/gestures-tapping.c'
2--- a/src/gestures-tapping.c 2011-03-17 09:48:13 +0000
3+++ b/src/gestures-tapping.c 2011-03-24 19:52:47 +0000
4@@ -89,7 +89,7 @@
5 }
6 if (!move->ntouch)
7 return 0;
8- set_props(ge->gin, state, move, frame);
9+ state->prop[GRAIL_PROP_TAP_DT] = move->time - state->start;
10 if ((move->active & fm_mask) ||
11 move->time - state->start > move->fm[FM_X].bar_ms) {
12 gin_gid_discard(ge, state->gid);
13
014
=== added file 'debian/patches/0002-disable-semi-mt-rotation.patch'
--- debian/patches/0002-disable-semi-mt-rotation.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/0002-disable-semi-mt-rotation.patch 2011-03-30 15:42:36 +0000
@@ -0,0 +1,25 @@
1=== modified file 'src/grail-gestures.c'
2--- a/src/grail-gestures.c 2011-02-24 22:50:31 +0000
3+++ b/src/grail-gestures.c 2011-03-17 09:43:52 +0000
4@@ -167,6 +167,7 @@
5 void gru_motion(struct grail *ge,
6 const struct utouch_frame *frame)
7 {
8+ const struct utouch_surface *s = utouch_frame_get_surface(ge->impl->fh);
9 struct gesture_recognizer *gru = ge->gru;
10 struct move_model *m = &gru->move;
11 grail_time_t t = frame->time;
12@@ -197,8 +198,10 @@
13 r = compute_radius(x, y, frame);
14 r = move_filter(&m->fm[FM_R], r);
15 a = m->fm[FM_A].value;
16- a += compute_rotation(x, y, r, frame);
17- a = move_filter(&m->fm[FM_A], a);
18+ if (!s->is_semi_mt) {
19+ a += compute_rotation(x, y, r, frame);
20+ a = move_filter(&m->fm[FM_A], a);
21+ }
22 move_update(m, FM_X, x, t);
23 move_update(m, FM_Y, y, t);
24 move_update(m, FM_R, r, t);
25
026
=== added file 'debian/patches/0003-add-touch-gestures.patch'
--- debian/patches/0003-add-touch-gestures.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/0003-add-touch-gestures.patch 2011-03-30 15:42:36 +0000
@@ -0,0 +1,508 @@
1=== modified file 'include/grail-types.h'
2--- a/include/grail-types.h 2010-08-19 20:36:11 +0000
3+++ b/include/grail-types.h 2011-03-28 20:04:07 +0000
4@@ -59,11 +59,20 @@
5
6 #define GRAIL_TYPE_SYSFLAG1 26 /* reserved system flag */
7
8+#define GRAIL_TYPE_TOUCH1 32 /* one-finger touch */
9+#define GRAIL_TYPE_TOUCH2 33 /* two-finger touch */
10+#define GRAIL_TYPE_TOUCH3 34 /* three-finger touch */
11+#define GRAIL_TYPE_TOUCH4 35 /* four-finger touch */
12+#define GRAIL_TYPE_TOUCH5 36 /* five-finger touch */
13+#define GRAIL_TYPE_ETOUCH 37 /* three-finger environment touch */
14+#define GRAIL_TYPE_MTOUCH 38 /* four-finger meta touch */
15+
16 #define GRAIL_MAIN_DRAG 0
17 #define GRAIL_MAIN_PINCH 1
18 #define GRAIL_MAIN_ROTATE 2
19 #define GRAIL_MAIN_TAP 3
20 #define GRAIL_MAIN_SYSFLAG 4
21+#define GRAIL_MAIN_TOUCH 5
22
23 #define GRAIL_PROP_DRAG_DX 0 /* horizontal position delta */
24 #define GRAIL_PROP_DRAG_DY 1 /* vertical position delta */
25@@ -160,5 +169,24 @@
26 #define GRAIL_PROP_TAP_X_T4 20
27 #define GRAIL_PROP_TAP_Y_T4 21
28
29+#define GRAIL_PROP_TOUCH_X1 0 /* bounding box x1 */
30+#define GRAIL_PROP_TOUCH_Y1 1 /* bounding box y1 */
31+#define GRAIL_PROP_TOUCH_X2 2 /* bounding box x2 */
32+#define GRAIL_PROP_TOUCH_Y2 3 /* bounding box y2 */
33+#define GRAIL_PROP_TOUCH_ID_T0 4 /* first touch id */
34+#define GRAIL_PROP_TOUCH_X_T0 5 /* first touch horizontal position */
35+#define GRAIL_PROP_TOUCH_Y_T0 6 /* first touch vertical position */
36+#define GRAIL_PROP_TOUCH_ID_T1 7
37+#define GRAIL_PROP_TOUCH_X_T1 8
38+#define GRAIL_PROP_TOUCH_Y_T1 9
39+#define GRAIL_PROP_TOUCH_ID_T2 10
40+#define GRAIL_PROP_TOUCH_X_T2 11
41+#define GRAIL_PROP_TOUCH_Y_T2 12
42+#define GRAIL_PROP_TOUCH_ID_T3 13
43+#define GRAIL_PROP_TOUCH_X_T3 14
44+#define GRAIL_PROP_TOUCH_Y_T3 15
45+#define GRAIL_PROP_TOUCH_ID_T4 16
46+#define GRAIL_PROP_TOUCH_X_T4 17
47+#define GRAIL_PROP_TOUCH_Y_T4 18
48
49 #endif
50
51=== modified file 'src/Makefile.am'
52--- a/src/Makefile.am 2011-01-02 12:08:42 +0000
53+++ b/src/Makefile.am 2011-03-28 20:04:07 +0000
54@@ -17,6 +17,7 @@
55 grail-inserter.h \
56 grail-gestures.c \
57 grail-gestures.h \
58+ gestures-touch.c \
59 gestures-drag.c \
60 gestures-pinch.c \
61 gestures-rotate.c \
62
63=== modified file 'src/Makefile.in'
64--- a/src/Makefile.in 2011-01-03 16:00:56 +0000
65+++ b/src/Makefile.in 2011-03-28 20:48:57 +0000
66@@ -72,9 +72,9 @@
67 LTLIBRARIES = $(lib_LTLIBRARIES)
68 libutouch_grail_la_LIBADD =
69 am_libutouch_grail_la_OBJECTS = grail-bits.lo grail-inserter.lo \
70- grail-gestures.lo gestures-drag.lo gestures-pinch.lo \
71- gestures-rotate.lo gestures-tapping.lo grail-recognizer.lo \
72- grail-event.lo grail-api.lo
73+ grail-gestures.lo gestures-touch.lo gestures-drag.lo \
74+ gestures-pinch.lo gestures-rotate.lo gestures-tapping.lo \
75+ grail-recognizer.lo grail-event.lo grail-api.lo
76 libutouch_grail_la_OBJECTS = $(am_libutouch_grail_la_OBJECTS)
77 libutouch_grail_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
78 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
79@@ -238,6 +238,7 @@
80 grail-inserter.h \
81 grail-gestures.c \
82 grail-gestures.h \
83+ gestures-touch.c \
84 gestures-drag.c \
85 gestures-pinch.c \
86 gestures-rotate.c \
87@@ -334,6 +335,7 @@
88 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gestures-pinch.Plo@am__quote@
89 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gestures-rotate.Plo@am__quote@
90 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gestures-tapping.Plo@am__quote@
91+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gestures-touch.Plo@am__quote@
92 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grail-api.Plo@am__quote@
93 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grail-bits.Plo@am__quote@
94 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grail-event.Plo@am__quote@
95
96=== modified file 'src/gestures-drag.c'
97--- a/src/gestures-drag.c 2011-03-17 09:48:13 +0000
98+++ b/src/gestures-drag.c 2011-03-28 20:04:18 +0000
99@@ -70,10 +70,8 @@
100 }
101 if ((move->timeout & fm_mask) == fm_mask) {
102 if (state->active) {
103- gin_gid_discard(ge, state->gid);
104- state->active = 0;
105+ gin_gid_timeout(ge, state->gid);
106 }
107- return 0;
108 }
109 if (!state->active) {
110 int type = getype[move->ntouch];
111@@ -84,7 +82,7 @@
112 }
113 if (!(move->tickle & mask))
114 return 0;
115- if (!move->single && !(move->active & fm_mask))
116+ if (!(move->active & fm_mask))
117 return 0;
118 set_props(ge->gin, state, move, frame);
119 gru_event(ge, state->gid, move, state->prop, state->nprop);
120@@ -107,10 +105,8 @@
121 }
122 if ((move->timeout & fm_mask) == fm_mask) {
123 if (state->active) {
124- gin_gid_discard(ge, state->gid);
125- state->active = 0;
126+ gin_gid_timeout(ge, state->gid);
127 }
128- return 0;
129 }
130 if (!state->active) {
131 if (move->ntouch == 4) {
132@@ -131,7 +127,7 @@
133 }
134 if (!(move->tickle & mask))
135 return 0;
136- if (!move->single && !(move->active & fm_mask))
137+ if (!(move->active & fm_mask))
138 return 0;
139 set_props(ge->gin, state, move, frame);
140 gru_event(ge, state->gid, move, state->prop, state->nprop);
141
142=== modified file 'src/gestures-pinch.c'
143--- a/src/gestures-pinch.c 2011-03-17 09:48:13 +0000
144+++ b/src/gestures-pinch.c 2011-03-28 20:04:11 +0000
145@@ -64,10 +64,8 @@
146 }
147 if ((move->timeout & fm_mask) == fm_mask) {
148 if (state->active) {
149- gin_gid_discard(ge, state->gid);
150- state->active = 0;
151+ gin_gid_timeout(ge, state->gid);
152 }
153- return 0;
154 }
155 if (!(move->tickle & mask))
156 return 0;
157@@ -102,10 +100,8 @@
158 }
159 if ((move->timeout & fm_mask) == fm_mask) {
160 if (state->active) {
161- gin_gid_discard(ge, state->gid);
162- state->active = 0;
163+ gin_gid_timeout(ge, state->gid);
164 }
165- return 0;
166 }
167 if (!(move->tickle & mask))
168 return 0;
169
170=== modified file 'src/gestures-rotate.c'
171--- a/src/gestures-rotate.c 2011-02-24 22:51:33 +0000
172+++ b/src/gestures-rotate.c 2011-03-28 20:04:11 +0000
173@@ -63,10 +63,8 @@
174 }
175 if ((move->timeout & fm_mask) == fm_mask) {
176 if (state->active) {
177- gin_gid_discard(ge, state->gid);
178- state->active = 0;
179+ gin_gid_timeout(ge, state->gid);
180 }
181- return 0;
182 }
183 if (!(move->tickle & mask))
184 return 0;
185@@ -101,10 +99,8 @@
186 }
187 if ((move->timeout & fm_mask) == fm_mask) {
188 if (state->active) {
189- gin_gid_discard(ge, state->gid);
190- state->active = 0;
191+ gin_gid_timeout(ge, state->gid);
192 }
193- return 0;
194 }
195 if (!(move->tickle & mask))
196 return 0;
197
198=== added file 'src/gestures-touch.c'
199--- a/src/gestures-touch.c 1970-01-01 00:00:00 +0000
200+++ b/src/gestures-touch.c 2011-03-28 20:04:07 +0000
201@@ -0,0 +1,94 @@
202+/*****************************************************************************
203+ *
204+ * grail - Gesture Recognition And Instantiation Library
205+ *
206+ * Copyright (C) 2010 Canonical Ltd.
207+ * Copyright (C) 2010 Henrik Rydberg <rydberg@bitmath.org>
208+ *
209+ * This program is free software: you can redistribute it and/or modify it
210+ * under the terms of the GNU General Public License as published by the
211+ * Free Software Foundation, either version 3 of the License, or (at your
212+ * option) any later version.
213+ *
214+ * This program is distributed in the hope that it will be useful, but
215+ * WITHOUT ANY WARRANTY; without even the implied warranty of
216+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
217+ * General Public License for more details.
218+ *
219+ * You should have received a copy of the GNU General Public License along
220+ * with this program. If not, see <http://www.gnu.org/licenses/>.
221+ *
222+ ****************************************************************************/
223+
224+#include "grail-recognizer.h"
225+#include <math.h>
226+#include <stdio.h>
227+
228+static const int getype[DIM_TOUCH + 1] = {
229+ -1,
230+ GRAIL_TYPE_TOUCH1,
231+ GRAIL_TYPE_TOUCH2,
232+ GRAIL_TYPE_TOUCH3,
233+ GRAIL_TYPE_TOUCH4,
234+ GRAIL_TYPE_TOUCH5,
235+};
236+
237+int gru_touch(struct grail *ge,
238+ const struct utouch_frame *frame)
239+{
240+ struct gesture_recognizer *gru = ge->gru;
241+ struct combo_model *state = &gru->touch;
242+ struct move_model *move = &gru->move;
243+ if (frame->slot_revision != frame->prev->slot_revision) {
244+ if (state->active) {
245+ gru_end(ge, state->gid, move,
246+ state->prop, state->nprop);
247+ state->active = 0;
248+ }
249+ }
250+ if (!state->active) {
251+ int type = getype[move->ntouch];
252+ if (type <= 0)
253+ return 0;
254+ state->gid = gin_gid_begin(ge, type, -PRIO_GESTURE, frame);
255+ state->active = 1;
256+ }
257+ state->nprop = gin_add_contact_props(ge->gin, state->prop, frame);
258+ gru_event(ge, state->gid, move, state->prop, state->nprop);
259+ return 1;
260+}
261+
262+int gru_wintouch(struct grail *ge,
263+ const struct utouch_frame *frame)
264+{
265+ struct gesture_recognizer *gru = ge->gru;
266+ struct combo_model *state = &gru->wintouch;
267+ struct move_model *move = &gru->move;
268+ if (frame->slot_revision != frame->prev->slot_revision) {
269+ if (state->active && out_of_bounds(state, move)) {
270+ gru_end(ge, state->gid, move,
271+ state->prop, state->nprop);
272+ state->active = 0;
273+ }
274+ }
275+ if (!state->active) {
276+ if (move->ntouch == 4) {
277+ state->gid = gin_gid_begin(ge, GRAIL_TYPE_MTOUCH,
278+ -PRIO_META, frame);
279+ state->mintouch = 1;
280+ state->maxtouch = 4;
281+ state->active = 1;
282+ } else if (move->ntouch == 3) {
283+ state->gid = gin_gid_begin(ge, GRAIL_TYPE_ETOUCH,
284+ -PRIO_ENV, frame);
285+ state->mintouch = 1;
286+ state->maxtouch = 3;
287+ state->active = 1;
288+ } else {
289+ return 0;
290+ }
291+ }
292+ state->nprop = gin_add_contact_props(ge->gin, state->prop, frame);
293+ gru_event(ge, state->gid, move, state->prop, state->nprop);
294+ return 1;
295+}
296
297=== modified file 'src/grail-gestures.c'
298--- a/src/grail-gestures.c 2011-03-17 09:48:13 +0000
299+++ b/src/grail-gestures.c 2011-03-28 20:04:16 +0000
300@@ -133,15 +133,14 @@
301 m->tickle &= ~(1 << i);
302 if (m->active & (1 << i))
303 return;
304- fm->action_delta = x - fm->original;
305- if (t - fm->original_ms > fm->hold_ms &&
306- fabs(fm->action_delta) > fm->bar) {
307- m->active |= (1 << i);
308+ fm->action_delta = 0;
309+ if (fabs(x - fm->original) > fm->bar) {
310+ if (t - fm->original_ms > fm->hold_ms) {
311+ m->active |= (1 << i);
312+ fm->action_delta = x - fm->original;
313+ }
314 } else if (t - fm->original_ms > fm->bar_ms) {
315- m->active |= (1 << i);
316 m->timeout |= (1 << i);
317- } else {
318- fm->action_delta = 0;
319 }
320 }
321
322
323=== modified file 'src/grail-gestures.h'
324--- a/src/grail-gestures.h 2011-02-24 22:51:17 +0000
325+++ b/src/grail-gestures.h 2011-03-28 20:04:07 +0000
326@@ -77,6 +77,8 @@
327 grail_prop_t prop[DIM_GRAIL_PROP];
328 };
329
330+int gru_touch(struct grail *ge,
331+ const struct utouch_frame *frame);
332 int gru_drag(struct grail *ge,
333 const struct utouch_frame *frame);
334 int gru_pinch(struct grail *ge,
335@@ -90,6 +92,8 @@
336 return m->ntouch < s->mintouch || m->ntouch > s->maxtouch;
337 }
338
339+int gru_wintouch(struct grail *ge,
340+ const struct utouch_frame *frame);
341 int gru_windrag(struct grail *ge,
342 const struct utouch_frame *frame);
343 int gru_winpinch(struct grail *ge,
344
345=== modified file 'src/grail-inserter.c'
346--- a/src/grail-inserter.c 2011-03-17 09:48:13 +0000
347+++ b/src/grail-inserter.c 2011-03-28 20:04:13 +0000
348@@ -38,6 +38,18 @@
349 return -1;
350 }
351
352+static int mask_overlap(const grail_mask_t *a, const grail_mask_t *b,
353+ int bytes)
354+{
355+ int i;
356+
357+ for (i = 0; i < bytes; i++)
358+ if (a[i] & b[i])
359+ return 1;
360+
361+ return 0;
362+}
363+
364 // todo: spanning tree for multi-user case
365 static void setup_new_gestures(struct grail *ge,
366 const struct utouch_frame *frame)
367@@ -114,33 +126,50 @@
368 void gin_frame_end(struct grail *ge, const struct utouch_frame *frame)
369 {
370 struct gesture_inserter *gin = ge->gin;
371- int i, hold = 0, discard = 0;
372+ grail_mask_t keep[DIM_TOUCH_BYTES];
373+ int i, hold[2] = { 0, 0 }, discard[2] = { 0, 0 };
374
375+ memset(keep, 0, sizeof(keep));
376 setup_new_gestures(ge, frame);
377
378 grail_mask_foreach(i, gin->used, sizeof(gin->used)) {
379 struct slot_state *s = &gin->state[i];
380 if (!s->nclient)
381 continue;
382- if (s->priority > hold)
383- hold = s->priority;
384+ if (s->priority > hold[s->slice])
385+ hold[s->slice] = s->priority;
386 if (s->status != GRAIL_STATUS_UPDATE)
387 continue;
388- if (s->priority > discard)
389- discard = s->priority;
390+ if (s->priority > discard[s->slice])
391+ discard[s->slice] = s->priority;
392 }
393
394 grail_mask_foreach(i, gin->used, sizeof(gin->used)) {
395 struct slot_state *s = &gin->state[i];
396- if (!s->nclient || s->priority < discard)
397+ if (!s->nclient || s->priority < discard[s->slice])
398 gin_gid_discard(ge, s->id);
399 }
400
401 grail_mask_foreach(i, gin->used, sizeof(gin->used)) {
402 struct slot_state *s = &gin->state[i];
403+ if (s->slice == 1)
404+ grail_mask_set_mask(keep, s->span, sizeof(keep));
405+ }
406+
407+ grail_mask_foreach(i, gin->used, sizeof(gin->used)) {
408+ struct slot_state *s = &gin->state[i];
409+ if (!s->timeout)
410+ continue;
411+ if (mask_overlap(keep, s->span, sizeof(keep)))
412+ continue;
413+ gin_gid_discard(ge, s->id);
414+ }
415+
416+ grail_mask_foreach(i, gin->used, sizeof(gin->used)) {
417+ struct slot_state *s = &gin->state[i];
418 struct gesture_event ev;
419 grail_mask_set(gin->types, s->type);
420- if (s->priority < hold)
421+ if (s->priority < hold[s->slice])
422 continue;
423 while (!gebuf_empty(&s->buf)) {
424 gebuf_get(&s->buf, &ev);
425@@ -166,7 +195,14 @@
426 return -1;
427 s = &gin->state[i];
428 s->type = type;
429- s->priority = priority;
430+ if (priority < 0) {
431+ s->priority = -priority;
432+ s->slice = 1;
433+ } else {
434+ s->priority = priority;
435+ s->slice = 0;
436+ }
437+ s->timeout = 0;
438 s->id = gin->gestureid++ & MAX_GESTURE_ID;
439 s->status = GRAIL_STATUS_BEGIN;
440 s->nclient = 0;
441@@ -193,6 +229,13 @@
442 grail_mask_set(gin->unused, i);
443 }
444
445+void gin_gid_timeout(struct grail *ge, int gid)
446+{
447+ int i = find_gslot(ge->gin, gid);
448+ if (i >= 0)
449+ ge->gin->state[i].timeout = 1;
450+}
451+
452 void gin_gid_event(struct grail *ge, int gid,
453 float x, float y, int ntouch,
454 const grail_prop_t *prop, int nprop,
455
456=== modified file 'src/grail-inserter.h'
457--- a/src/grail-inserter.h 2011-03-17 09:48:13 +0000
458+++ b/src/grail-inserter.h 2011-03-28 20:04:11 +0000
459@@ -37,6 +37,8 @@
460 struct slot_state {
461 int type;
462 int priority;
463+ int slice;
464+ int timeout;
465 int id;
466 int status;
467 int nclient;
468@@ -78,6 +80,7 @@
469 int gin_gid_begin(struct grail *ge, int type, int priority,
470 const struct utouch_frame *frame);
471 void gin_gid_discard(struct grail *ge, int gid);
472+void gin_gid_timeout(struct grail *ge, int gid);
473
474 void gin_gid_event(struct grail *ge, int gid,
475 float x, float y, int ntouch,
476
477=== modified file 'src/grail-recognizer.c'
478--- a/src/grail-recognizer.c 2011-01-02 12:08:08 +0000
479+++ b/src/grail-recognizer.c 2011-03-28 20:04:07 +0000
480@@ -47,9 +47,11 @@
481 if (!ge->gin || !ge->gru)
482 return;
483 gru_motion(ge, frame);
484+ gru_touch(ge, frame);
485 gru_drag(ge, frame);
486 gru_pinch(ge, frame);
487 gru_rotate(ge, frame);
488+ gru_wintouch(ge, frame);
489 gru_windrag(ge, frame);
490 gru_winpinch(ge, frame);
491 gru_winrotate(ge, frame);
492
493=== modified file 'src/grail-recognizer.h'
494--- a/src/grail-recognizer.h 2011-02-24 22:49:22 +0000
495+++ b/src/grail-recognizer.h 2011-03-28 20:04:07 +0000
496@@ -27,9 +27,11 @@
497
498 struct gesture_recognizer {
499 struct move_model move;
500+ struct combo_model touch;
501 struct combo_model drag;
502 struct combo_model pinch;
503 struct combo_model rotate;
504+ struct combo_model wintouch;
505 struct combo_model windrag;
506 struct combo_model winpinch;
507 struct combo_model winrotate;
508
0509
=== added file 'debian/patches/0004-dont-hold-back-active-gestures.patch'
--- debian/patches/0004-dont-hold-back-active-gestures.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/0004-dont-hold-back-active-gestures.patch 2011-03-30 15:42:36 +0000
@@ -0,0 +1,48 @@
1=== modified file 'src/grail-inserter.c'
2--- a/src/grail-inserter.c 2011-03-28 20:04:13 +0000
3+++ b/src/grail-inserter.c 2011-03-30 15:37:59 +0000
4@@ -146,7 +146,7 @@
5
6 grail_mask_foreach(i, gin->used, sizeof(gin->used)) {
7 struct slot_state *s = &gin->state[i];
8- if (!s->nclient || s->priority < discard[s->slice])
9+ if (!s->nclient || s->priority < discard[s->slice] && !s->sent)
10 gin_gid_discard(ge, s->id);
11 }
12
13@@ -169,12 +169,13 @@
14 struct slot_state *s = &gin->state[i];
15 struct gesture_event ev;
16 grail_mask_set(gin->types, s->type);
17- if (s->priority < hold[s->slice])
18+ if (s->priority < hold[s->slice] && !s->sent)
19 continue;
20 while (!gebuf_empty(&s->buf)) {
21 gebuf_get(&s->buf, &ev);
22 gin_send_event(ge, s, &ev, frame);
23 }
24+ s->sent = 1;
25 }
26
27 grail_mask_foreach(i, gin->used, sizeof(gin->used)) {
28@@ -203,6 +204,7 @@
29 s->slice = 0;
30 }
31 s->timeout = 0;
32+ s->sent = 0;
33 s->id = gin->gestureid++ & MAX_GESTURE_ID;
34 s->status = GRAIL_STATUS_BEGIN;
35 s->nclient = 0;
36
37=== modified file 'src/grail-inserter.h'
38--- a/src/grail-inserter.h 2011-03-28 20:04:11 +0000
39+++ b/src/grail-inserter.h 2011-03-30 15:37:20 +0000
40@@ -39,6 +39,7 @@
41 int priority;
42 int slice;
43 int timeout;
44+ int sent;
45 int id;
46 int status;
47 int nclient;
48
049
=== added file 'debian/patches/series'
--- debian/patches/series 1970-01-01 00:00:00 +0000
+++ debian/patches/series 2011-03-30 15:42:36 +0000
@@ -0,0 +1,4 @@
10001-set-proper-tap-properties.patch
20002-disable-semi-mt-rotation.patch
30003-add-touch-gestures.patch
40004-dont-hold-back-active-gestures.patch

Subscribers

People subscribed via source and target branches

to all changes: