From 48d33ab9b672b3b3ca308000cdbd573d1e368ff9 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Apr 2008 14:29:53 +0930 Subject: [PATCH] dix: float attached devices _before_ disabling the master. It also helps if we're actually providing the correct argument to AttachDevice... --- dix/devices.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 266a66c61..d4459168f 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -301,6 +301,16 @@ DisableDevice(DeviceIntPtr dev) if (*prev != dev) return FALSE; + /* float attached devices */ + if (dev->isMaster) + { + for (other = inputInfo.devices; other; other = other->next) + { + if (other->u.master == dev) + AttachDevice(NULL, other, NULL); + } + } + if (dev->isMaster && dev->spriteInfo->sprite) { for (other = inputInfo.devices; other; other = other->next) @@ -320,16 +330,6 @@ DisableDevice(DeviceIntPtr dev) dev->next = inputInfo.off_devices; inputInfo.off_devices = dev; - /* float attached devices */ - if (dev->isMaster) - { - for (other = inputInfo.devices; other; other = other->next) - { - if (other->u.master == dev) - AttachDevice(NULL, dev, NULL); - } - } - ev.type = DevicePresenceNotify; ev.time = currentTime.milliseconds; ev.devchange = DeviceDisabled;