mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 01:48:02 +02:00
dix: disable non-sprite-owners first when disabling paired devices
If a sprite-owner is to be disabled but still paired, disable the paired device first. i.e. disabling a master pointer will disable the master keyboard first. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
parent
df1704365e
commit
e433d1046c
1 changed files with 5 additions and 2 deletions
|
|
@ -458,10 +458,13 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
|
|||
|
||||
if (IsMaster(dev) && dev->spriteInfo->sprite) {
|
||||
for (other = inputInfo.devices; other; other = other->next)
|
||||
BUG_RETURN_VAL_MSG(other->spriteInfo->paired == dev, FALSE,
|
||||
"%s still paired with %s", dev->name, other->spriteInfo->paired->name);
|
||||
if (other->spriteInfo->paired == dev && !other->spriteInfo->spriteOwner)
|
||||
DisableDevice(other, sendevent);
|
||||
}
|
||||
|
||||
if (dev->spriteInfo->paired)
|
||||
dev->spriteInfo->paired = NULL;
|
||||
|
||||
(void) (*dev->deviceProc) (dev, DEVICE_OFF);
|
||||
dev->enabled = FALSE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue