summaryrefslogtreecommitdiff
path: root/src/synproto.c
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-03-21 12:58:29 -0700
committerPeter Hutterer <peter.hutterer@who-t.net>2012-03-22 14:30:50 +1000
commiteba82d203e5e817a61180c6510d8de0d063ed05d (patch)
tree9694bfab239e3f08e04e72e87379b41b9d175a93 /src/synproto.c
parent73ec252b6f2d25cc49557b1d3789b459b60b8d4e (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/synproto.c')
-rw-r--r--src/synproto.c13
1 files changed, 12 insertions, 1 deletions
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
}