summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-04-24 15:31:36 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-04-26 10:29:38 +1000
commit9ecf505c6473c65cd850a58b1b6eeb86f7d390e6 (patch)
tree387209a76440141abe9c42e200dfbd58c1370431
parentf300adb027b856c944e0e25d0f32948823fe6b62 (diff)
Reset touch state on DeviceOff (#49161)
Don't leave touches lingering around during suspend. Test case: 1) leave finger on touchpad 2) xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0 3) lift fingers 4) xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1 X.Org Bug 49161 <http://bugs.freedesktop.org/show_bug.cgi?id=49161> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--src/eventcomm.c1
-rw-r--r--src/synaptics.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 9d1233c..5707e38 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -128,6 +128,7 @@ UninitializeTouch(InputInfoPtr pInfo)
mtdev_close(proto_data->mtdev);
proto_data->mtdev = NULL;
+ proto_data->num_touches = 0;
}
static void
diff --git a/src/synaptics.c b/src/synaptics.c
index 853bfa8..d2fe960 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1086,6 +1086,7 @@ DeviceOff(DeviceIntPtr dev)
if (pInfo->fd != -1) {
TimerCancel(priv->timer);
xf86RemoveEnabledDevice(pInfo);
+ SynapticsResetTouchHwState(priv->hwState);
if (priv->proto_ops->DeviceOffHook &&
!priv->proto_ops->DeviceOffHook(pInfo))
rc = !Success;