summaryrefslogtreecommitdiff
path: root/src/synproto.c
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-02-08 15:06:33 -0800
committerPeter Hutterer <peter.hutterer@who-t.net>2012-02-11 07:46:05 +1000
commit336f9a09d090a8c3a9c976ab04ffb17bcdc2c2ea (patch)
tree34c34d18b1b2373b5bcc8c95b384c300b43f36c6 /src/synproto.c
parent673c5fa14bff669d82f5711511a37bd3abe75471 (diff)
Move X touch event processing into synaptics.c
Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/synproto.c')
-rw-r--r--src/synproto.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/synproto.c b/src/synproto.c
index 49d333d..0426e8f 100644
--- a/src/synproto.c
+++ b/src/synproto.c
@@ -135,3 +135,22 @@ SynapticsCopyHwState(struct SynapticsHwState *dst,
dst->num_mt_mask * sizeof(enum SynapticsSlotState));
#endif
}
+
+void
+SynapticsResetTouchHwState(struct SynapticsHwState *hw)
+{
+#ifdef HAVE_MULTITOUCH
+ int i;
+
+ for (i = 0; i < hw->num_mt_mask; i++)
+ {
+ int j;
+
+ /* Leave x and y valuators in case we need to restart touch */
+ 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;
+ }
+#endif
+}