diff options
author | Chase Douglas <chase.douglas@canonical.com> | 2012-03-21 12:58:29 -0700 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-03-22 14:30:50 +1000 |
commit | eba82d203e5e817a61180c6510d8de0d063ed05d (patch) | |
tree | 9694bfab239e3f08e04e72e87379b41b9d175a93 /src | |
parent | 73ec252b6f2d25cc49557b1d3789b459b60b8d4e (diff) |
Keep track of which touch slots are open
This change adds a new touch slot state that denotes when the slot is
open but does not have any new data to report.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/eventcomm.c | 3 | ||||
-rw-r--r-- | src/synproto.c | 13 | ||||
-rw-r--r-- | src/synproto.h | 1 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c index f199c24..3721c91 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -557,7 +557,8 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw, { int slot_index = last_mt_vals_slot(priv); - if (hw->slot_state[slot_index] == SLOTSTATE_EMPTY) + if (hw->slot_state[slot_index] == SLOTSTATE_EMPTY || + hw->slot_state[slot_index] == SLOTSTATE_OPEN_EMPTY) hw->slot_state[slot_index] = SLOTSTATE_UPDATE; if (ev->code == ABS_MT_TRACKING_ID) { diff --git a/src/synproto.c b/src/synproto.c index bdf2d21..19a13e5 100644 --- a/src/synproto.c +++ b/src/synproto.c @@ -152,7 +152,18 @@ SynapticsResetTouchHwState(struct SynapticsHwState *hw) for (j = 2; j < valuator_mask_num_valuators(hw->mt_mask[i]); j++) valuator_mask_unset(hw->mt_mask[i], j); - hw->slot_state[i] = SLOTSTATE_EMPTY; + switch (hw->slot_state[i]) + { + case SLOTSTATE_OPEN: + case SLOTSTATE_OPEN_EMPTY: + case SLOTSTATE_UPDATE: + hw->slot_state[i] = SLOTSTATE_OPEN_EMPTY; + break; + + default: + hw->slot_state[i] = SLOTSTATE_EMPTY; + break; + } } #endif } diff --git a/src/synproto.h b/src/synproto.h index 95ebc92..e16aeb0 100644 --- a/src/synproto.h +++ b/src/synproto.h @@ -42,6 +42,7 @@ enum SynapticsSlotState SLOTSTATE_EMPTY = 0, SLOTSTATE_OPEN, SLOTSTATE_CLOSE, + SLOTSTATE_OPEN_EMPTY, SLOTSTATE_UPDATE, }; |