From 937e5aae33d3b5112b5d10d605e25f57b48caa3f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 14 May 2008 22:30:15 +0930 Subject: [PATCH] dix: don't undisplay cursor if we don't own a sprite. Sometimes we didn't have a cursor when coming back from suspend. Reason was that the suspend caused the server to lose the device that was attached to the VCP, and a RemoveDevice() would then set the cursor to NULL. Solution: only set the cursor to NULL if we actually own the sprite. --- dix/devices.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 05a6b51af..4dd1dc5f1 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -885,7 +885,8 @@ RemoveDevice(DeviceIntPtr dev) return BadImplementation; initialized = dev->inited; - screen->DisplayCursor(dev, screen, NullCursor); + if (DevHasCursor(dev)) + screen->DisplayCursor(dev, screen, NullCursor); deviceid = dev->id; DisableDevice(dev);