OSDN Git Service

Rely on SYN-Events when pen is lifted
authorChris Larson <clarson@kergoth.com>
Tue, 24 Mar 2009 18:05:15 +0000 (18:05 +0000)
committerChris Larson <clarson@kergoth.com>
Tue, 24 Mar 2009 18:05:15 +0000 (18:05 +0000)
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 <michael.heimpold@s2000.tu-chemnitz.de>
Signed-off-by: Chris Larson <clarson@kergoth.com>
plugins/input-raw.c

index a22390d..d75afef 100644 (file)
@@ -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;
                                }