summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/grail-api.c13
1 files changed, 10 insertions, 3 deletions
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,
82 evbuf_clear(&x->evbuf); 82 evbuf_clear(&x->evbuf);
83 return; 83 return;
84 } 84 }
85 if (hack > x->hack_status) {
86 ev = *syn;
87 ev.type = EV_KEY;
88 ev.code = BTN_TOUCH;
89 ev.value = hack;
90 ge->event(ge, &ev);
91 x->hack_status = hack;
92 nevent++;
93 }
85 while (!evbuf_empty(&x->evbuf)) { 94 while (!evbuf_empty(&x->evbuf)) {
86 evbuf_get(&x->evbuf, &ev); 95 evbuf_get(&x->evbuf, &ev);
87 if (!hack && ev.type == EV_ABS)
88 continue;
89 if (dofilt && grail_mask_get(filtered, ev.type)) 96 if (dofilt && grail_mask_get(filtered, ev.type))
90 continue; 97 continue;
91 if (extra_filtered(&ev)) 98 if (extra_filtered(&ev))
@@ -93,7 +100,7 @@ static void tp_sync(struct touch_engine *engine,
93 ge->event(ge, &ev); 100 ge->event(ge, &ev);
94 nevent++; 101 nevent++;
95 } 102 }
96 if (hack != x->hack_status) { 103 if (hack < x->hack_status) {
97 ev = *syn; 104 ev = *syn;
98 ev.type = EV_KEY; 105 ev.type = EV_KEY;
99 ev.code = BTN_TOUCH; 106 ev.code = BTN_TOUCH;