Commit 90299556 authored by Peter Hutterer's avatar Peter Hutterer

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's avatarPeter Hutterer <>
Reviewed-by: default avatarChase Douglas <>
(cherry picked from commit f3410b97)


parent b53cdf4c
...@@ -432,6 +432,8 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent) ...@@ -432,6 +432,8 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
if (*prev != dev) if (*prev != dev)
return FALSE; return FALSE;
/* float attached devices */ /* float attached devices */
if (IsMaster(dev)) { if (IsMaster(dev)) {
for (other = inputInfo.devices; other; other = other->next) { for (other = inputInfo.devices; other; other = other->next) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment