From 4b21599b7ade620aa02b359335f618b5b10185da Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Thu, 12 Aug 2010 02:15:11 +0100 Subject: the bug fix, raw material --- src/grail-api.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/grail-api.c b/src/grail-api.c index 7c054a9..03355dc 100644 --- a/src/grail-api.c +++ b/src/grail-api.c @@ -82,10 +82,17 @@ static void tp_sync(struct touch_engine *engine, evbuf_clear(&x->evbuf); return; } + if (hack > x->hack_status) { + ev = *syn; + ev.type = EV_KEY; + ev.code = BTN_TOUCH; + ev.value = hack; + ge->event(ge, &ev); + x->hack_status = hack; + nevent++; + } 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)) @@ -93,7 +100,7 @@ static void tp_sync(struct touch_engine *engine, ge->event(ge, &ev); nevent++; } - if (hack != x->hack_status) { + if (hack < x->hack_status) { ev = *syn; ev.type = EV_KEY; ev.code = BTN_TOUCH; -- cgit v1.2.3