From ab495fd034cc6166cb631297b558da171c840f43 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Tue, 10 Aug 2010 19:07:44 +0100 Subject: 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 --- src/grail-api.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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) if (ev->type == EV_KEY) { switch (ev->code) { case BTN_TOUCH: + case BTN_TOOL_FINGER: case BTN_TOOL_DOUBLETAP: case BTN_TOOL_TRIPLETAP: case BTN_TOOL_QUADTAP: @@ -83,6 +84,8 @@ static void tp_sync(struct touch_engine *engine, } while (!evbuf_empty(&x->evbuf)) { evbuf_get(&x->evbuf, &ev); + if (!hack && ev.type == EV_ABS) + continue; if (dofilt && grail_mask_get(filtered, ev.type)) continue; if (extra_filtered(&ev)) @@ -97,6 +100,7 @@ static void tp_sync(struct touch_engine *engine, ev.value = hack; ge->event(ge, &ev); x->hack_status = hack; + nevent++; } if (nevent) ge->event(ge, syn); -- cgit v1.2.3