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.
This commit is contained in:
Peter Hutterer 2008-05-14 22:30:15 +09:30
parent 68b4f250ee
commit 937e5aae33

View File

@ -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);