summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-04-15 14:29:53 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-04-15 14:29:53 +0930
commit48d33ab9b672b3b3ca308000cdbd573d1e368ff9 (patch)
tree8f74d244bca899e46943cb5468db71637e0ca1a1
parent4cf9c5909d926ec322ed1c7df47f95bd872bb607 (diff)
dix: float attached devices _before_ disabling the master.
It also helps if we're actually providing the correct argument to AttachDevice...
-rw-r--r--dix/devices.c20
1 files 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;