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-01 11:36:36 +1000 |
commit | f3410b97cf9b48a47bee3d15d232f8a88e75f4ef (patch) | |
tree | a3ffe7e5e384e2c24f8020001d334485b7eaae3a /dix | |
parent | af88b43f9e604157b74270d609c08bdfa256a792 (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>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/devices.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/dix/devices.c b/dix/devices.c index 600f8b738..7f3886507 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -437,6 +437,7 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent) if (*prev != dev) return FALSE; + ReleaseButtonsAndKeys(dev); SyncRemoveDeviceIdleTime(dev->idle_counter); dev->idle_counter = NULL; |