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>
This commit is contained in:
parent
af88b43f9e
commit
f3410b97cf
|
@ -437,6 +437,7 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
|
|||
if (*prev != dev)
|
||||
return FALSE;
|
||||
|
||||
ReleaseButtonsAndKeys(dev);
|
||||
SyncRemoveDeviceIdleTime(dev->idle_counter);
|
||||
dev->idle_counter = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue