diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-04-30 10:01:48 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-03 11:24:44 +1000 |
commit | 90299556db24543bb7365e8c2897deca3aa219e7 (patch) | |
tree | 6dba4c9195b410a795b3423cfc2dde85e9309d6d | |
parent | b53cdf4c53f0787ed41281278877e0405fcb2674 (diff) |
dix: when disabling a device, release all buttons and keys
A suspend-induced device disable may happen before the device gets to see
the button release event. On resume, the server's internal state still has
some buttons pressed, causing inconsistent behaviour.
Force the release and the matching events to be sent to the client.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
(cherry picked from commit f3410b97cf9b48a47bee3d15d232f8a88e75f4ef)
Conflicts:
dix/devices.c
-rw-r--r-- | dix/devices.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dix/devices.c b/dix/devices.c index 012550443..d0e99bd62 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -432,6 +432,8 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent) if (*prev != dev) return FALSE; + ReleaseButtonsAndKeys(dev); + /* float attached devices */ if (IsMaster(dev)) { for (other = inputInfo.devices; other; other = other->next) { |