summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-05-14 22:30:15 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-05-14 22:30:15 +0930
commit937e5aae33d3b5112b5d10d605e25f57b48caa3f (patch)
tree2e57a8bd0787ffd9feeb89e1ad7d4feed2ac7c7c
parent68b4f250eef441a3d75e3b9b2665a51d3a1538d6 (diff)
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.
-rw-r--r--dix/devices.c3
1 files changed, 2 insertions, 1 deletions
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);