From: Chris Larson Date: Tue, 24 Mar 2009 18:05:15 +0000 (+0000) Subject: Rely on SYN-Events when pen is lifted X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=93e00fec86cd21af033aecea3d165b5250558b8f;p=android-x86%2Fexternal-tslib.git Rely on SYN-Events when pen is lifted when the input-raw module of tslib relies on SYN-Events, it should not report a BTN_TOUCH to upper layers before the corresponding EV_SYN was seen. This prevents seeing two pen up events as described in my posting from Jan, 14 2009. Signed-off-by: Michael Heimpold Signed-off-by: Chris Larson --- diff --git a/plugins/input-raw.c b/plugins/input-raw.c index a22390d..d75afef 100644 --- a/plugins/input-raw.c +++ b/plugins/input-raw.c @@ -156,12 +156,9 @@ static int ts_input_read(struct tslib_module_info *inf, case BTN_TOUCH: if (ev.value == 0) { /* pen up */ - samp->x = 0; - samp->y = 0; - samp->pressure = 0; - samp->tv = ev.time; - samp++; - total++; + i->current_x = 0; + i->current_y = 0; + i->current_p = 0; } break; }