mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 05:18:25 +02:00
dix: when shutting down slave devices, shut down xtest devices last
XTest devices are the first ones in the list, being initialised together
with the master devices. If we disable the devices in-order and a device has
a button down when being disabled, the XTest device is checked for a
required button release (xkbAccessX.c's ProcessPointerEvent). This fails if
the device is already NULL.
Instead of putting the check there, disable the devices in the reverse order
they are initialised. Disable physical slaves first, then xtest devices,
then the master devices.
Testcase: shut down server with a button still held down on a physical
device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 3e4be4033a)
This commit is contained in:
parent
d8a09a4b15
commit
29a0c87f4d
1 changed files with 6 additions and 0 deletions
|
|
@ -514,6 +514,12 @@ DisableAllDevices(void)
|
|||
{
|
||||
DeviceIntPtr dev, tmp;
|
||||
|
||||
/* Disable slave devices first, excluding XTest devices */
|
||||
nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) {
|
||||
if (!IsXTestDevice(dev, NULL) && !IsMaster(dev))
|
||||
DisableDevice(dev, FALSE);
|
||||
}
|
||||
/* Disable XTest devices */
|
||||
nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) {
|
||||
if (!IsMaster(dev))
|
||||
DisableDevice(dev, FALSE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue