From 67d7821ae783d3f123b6ba7203abf847374a1e36 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 21 Jul 2008 11:48:24 -0700 Subject: 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 --- dix/devices.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'dix') 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) { -- cgit v1.2.3