summaryrefslogtreecommitdiff
path: root/src/synaptics.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/synaptics.c')
-rw-r--r--src/synaptics.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index ace0ec7..8e6022a 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1026,6 +1026,8 @@ error:
static void
SynapticsReset(SynapticsPrivate * priv)
{
+ int i;
+
SynapticsResetHwState(priv->hwState);
SynapticsResetHwState(priv->local_hw_state);
SynapticsResetHwState(priv->comm.hwState);
@@ -1055,7 +1057,9 @@ SynapticsReset(SynapticsPrivate * priv)
priv->prev_z = 0;
priv->prevFingers = 0;
priv->num_active_touches = 0;
- memset(priv->open_slots, 0, priv->num_slots * sizeof(int));
+
+ for (i = 0; i < priv->num_slots; i++)
+ priv->open_slots[i] = -1;
}
static int
@@ -1352,6 +1356,8 @@ DeviceInit(DeviceIntPtr dev)
InitDeviceProperties(pInfo);
XIRegisterPropertyHandler(pInfo->dev, SetProperty, NULL, NULL);
+ SynapticsReset(priv);
+
return Success;
fail: