summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-07-21 11:48:24 -0700
committerPeter Hutterer <peter.hutterer@who-t.net>2008-07-22 15:54:48 +0930
commit67d7821ae783d3f123b6ba7203abf847374a1e36 (patch)
tree2f5c37997736b2d38409116725095b5a1a09e800 /dix
parent8c8c4fdf34bfc9d54ebea99fb0af14cad167b4a0 (diff)
dix: reset potential lastSlaves when disabling an SD
Unplug a mouse, then warp the pointer and the warp pointer code will try to update the position of the last slave device associated with the master. That pointer will be stale and the X server will crash. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r--dix/devices.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/dix/devices.c b/dix/devices.c
index 1cde5c09a..383c1c799 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -358,6 +358,14 @@ DisableDevice(DeviceIntPtr dev)
AttachDevice(NULL, other, NULL);
}
}
+ else
+ {
+ for (other = inputInfo.devices; other; other = other->next)
+ {
+ if (other->isMaster && other->u.lastSlave == dev)
+ other->u.lastSlave = NULL;
+ }
+ }
if (dev->isMaster && dev->spriteInfo->sprite)
{