mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-18 06:10:38 +02:00
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 f3410b97cf)
Conflicts:
dix/devices.c
This commit is contained in:
parent
b53cdf4c53
commit
90299556db
1 changed files with 2 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue