From 2ce305129ca94394096f4d697d51eb120de2940b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Oct 2011 13:21:18 +1000 Subject: Skip event posting for empty slots. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ABS_MT_SLOT comes before any other events. The following order of events is common for protocol B devices (and mtdev): ... EV_SYN ABS_MT_SLOT → posting here means we miss on the position information ABS_MT_POSITION_X ABS_MT_POSITION_Y ABS_MT_SLOT ABS_MT_POSITION_X ABS_MT_POSITION_Y EV_SYN Store the stot state as SLOT_EMPTY after posting an event (i.e. EV_SYN and ABS_MT_SLOT) and then don't post until the next slot/syn event. Signed-off-by: Peter Hutterer --- src/evdev.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/evdev.h') diff --git a/src/evdev.h b/src/evdev.h index 165aea4..27e404c 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -103,6 +103,7 @@ enum fkeymode { enum SlotState { SLOTSTATE_OPEN = 8, SLOTSTATE_CLOSE, + SLOTSTATE_UPDATE, SLOTSTATE_EMPTY, }; -- cgit v1.2.3