diff options
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r-- | xorg-server/dix/events.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 47c61d42b..009e21b5d 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -3198,6 +3198,18 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) #endif } +void FreeSprite(DeviceIntPtr dev) +{ + if (DevHasCursor(dev) && dev->spriteInfo->sprite) { + if (dev->spriteInfo->sprite->current) + FreeCursor(dev->spriteInfo->sprite->current, None); + free(dev->spriteInfo->sprite->spriteTrace); + free(dev->spriteInfo->sprite); + } + dev->spriteInfo->sprite = NULL; +} + + /** * Update the mouse sprite info when the server switches from a pScreen to another. * Otherwise, the pScreen of the mouse sprite is never updated when we switch |