mirror of
https://github.com/X11Libre/xf86-input-synaptics.git
synced 2026-03-24 01:34:04 +00:00
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>
This commit is contained in:
@@ -128,6 +128,7 @@ UninitializeTouch(InputInfoPtr pInfo)
|
||||
|
||||
mtdev_close(proto_data->mtdev);
|
||||
proto_data->mtdev = NULL;
|
||||
proto_data->num_touches = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user