summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-08-10 19:07:44 +0100
committerHenrik Rydberg <rydberg@euromail.se>2010-08-10 19:07:44 +0100
commitab495fd034cc6166cb631297b558da171c840f43 (patch)
tree3ff58aff42fb66f2d4b7a6ae221edb3e6913aade /src
parent131d3f122931f90eb2e81b4a614a96389353f756 (diff)
Count the extra touch event and mask additional abs events
Not counting the BTN_TOUCH event implied not emitting the sync event, which confused evdev. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src')
-rw-r--r--src/grail-api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/grail-api.c b/src/grail-api.c
index 9774e01..fa3436c 100644
--- a/src/grail-api.c
+++ b/src/grail-api.c
@@ -52,6 +52,7 @@ static int extra_filtered(const struct input_event *ev)
52 if (ev->type == EV_KEY) { 52 if (ev->type == EV_KEY) {
53 switch (ev->code) { 53 switch (ev->code) {
54 case BTN_TOUCH: 54 case BTN_TOUCH:
55 case BTN_TOOL_FINGER:
55 case BTN_TOOL_DOUBLETAP: 56 case BTN_TOOL_DOUBLETAP:
56 case BTN_TOOL_TRIPLETAP: 57 case BTN_TOOL_TRIPLETAP:
57 case BTN_TOOL_QUADTAP: 58 case BTN_TOOL_QUADTAP:
@@ -83,6 +84,8 @@ static void tp_sync(struct touch_engine *engine,
83 } 84 }
84 while (!evbuf_empty(&x->evbuf)) { 85 while (!evbuf_empty(&x->evbuf)) {
85 evbuf_get(&x->evbuf, &ev); 86 evbuf_get(&x->evbuf, &ev);
87 if (!hack && ev.type == EV_ABS)
88 continue;
86 if (dofilt && grail_mask_get(filtered, ev.type)) 89 if (dofilt && grail_mask_get(filtered, ev.type))
87 continue; 90 continue;
88 if (extra_filtered(&ev)) 91 if (extra_filtered(&ev))
@@ -97,6 +100,7 @@ static void tp_sync(struct touch_engine *engine,
97 ev.value = hack; 100 ev.value = hack;
98 ge->event(ge, &ev); 101 ge->event(ge, &ev);
99 x->hack_status = hack; 102 x->hack_status = hack;
103 nevent++;
100 } 104 }
101 if (nevent) 105 if (nevent)
102 ge->event(ge, syn); 106 ge->event(ge, syn);