summaryrefslogtreecommitdiff
path: root/test/grail-gesture.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-08-26 16:23:38 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-08-26 16:23:38 +0200
commitbabe344373d036d57a270658d134d6c0b334f280 (patch)
tree28060c18592e11a3a31bd7db02b1f197b7d3b397 /test/grail-gesture.c
parent3b776917d8037bec30a62b802433194ecead929f (diff)
Correct abs event handling
The current code lets abs events through during one-finger drags, and tapping does not work properly due to abs events not always being present during taps. Track the pointer position and emit abs events only if no gestures are in effect, and only if not explicitly filtered. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'test/grail-gesture.c')
-rw-r--r--test/grail-gesture.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/grail-gesture.c b/test/grail-gesture.c
index d30e713..d2e0e7d 100644
--- a/test/grail-gesture.c
+++ b/test/grail-gesture.c
@@ -46,8 +46,6 @@ static int tp_get_clients(struct grail *ge,
46 46
47static void tp_event(struct grail *ge, const struct input_event *ev) 47static void tp_event(struct grail *ge, const struct input_event *ev)
48{ 48{
49 if (!grail_mask_get(flag_mask, GRAIL_TYPE_DRAG1))
50 return;
51 fprintf(stderr, "event %d 0x%x %d\n", ev->type, ev->code, ev->value); 49 fprintf(stderr, "event %d 0x%x %d\n", ev->type, ev->code, ev->value);
52} 50}
53 51
@@ -112,7 +110,7 @@ int main(int argc, char *argv[])
112 fprintf(stderr, "error: could not open touch device\n"); 110 fprintf(stderr, "error: could not open touch device\n");
113 return -1; 111 return -1;
114 } 112 }
115 grail_filter_abs_events(&ge, 1); 113 //grail_filter_abs_events(&ge, 1);
116 114
117 struct grail_coord min = { -2, -1 }, max = { 2, 1 }; 115 struct grail_coord min = { -2, -1 }, max = { 2, 1 };
118 grail_set_bbox(&ge, &min, &max); 116 grail_set_bbox(&ge, &min, &max);