aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-08-05 15:59:17 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-08-18 10:01:47 +1000
commit8ce06c96e469139bb12065d80fe4abb6173e2855 (patch)
treefbe0fba24e17af96742ac9b2954334a708df5c1b /src/evdev.h
parentevdev 2.9.0 (diff)
downloadxf86-input-evdev-8ce06c96e469139bb12065d80fe4abb6173e2855.tar.gz
xf86-input-evdev-8ce06c96e469139bb12065d80fe4abb6173e2855.tar.bz2
xf86-input-evdev-8ce06c96e469139bb12065d80fe4abb6173e2855.zip
Make the slot-state per slot
The previous approach only had the slot state for the current slot. If we changed slots, that means we lost the information if the slot was ever initialized. If the ABS_MT_TRACKING_ID was never received, the slot would still update and try to send events (which the server refused with a warning). Avoid this by having a per-slot state and a dirty bit that tells us if the current slot updated at all. If we don't get the tracking ID, leave the slot empty and refuse any further events from that touch. This quashes the various "unable to find touch point 0" warnings caused if a touchpoint starts before the device is enabled. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Walter Harms <wharms@bfs.de>
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/evdev.h b/src/evdev.h
index 520d017..2d6b62d 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -167,7 +167,10 @@ typedef struct {
ValuatorMask *mt_mask;
ValuatorMask **last_mt_vals;
int cur_slot;
- enum SlotState slot_state;
+ struct slot {
+ int dirty;
+ enum SlotState state;
+ } *slots;
#ifdef MULTITOUCH
struct mtdev *mtdev;
#endif