diff options
Diffstat (limited to 'xorg-server/dix')
-rw-r--r-- | xorg-server/dix/devices.c | 7 | ||||
-rw-r--r-- | xorg-server/dix/events.c | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index 73f60f46e..7f079ffa1 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -946,8 +946,9 @@ CloseDevice(DeviceIntPtr dev) if (dev->inited) (void) (*dev->deviceProc) (dev, DEVICE_CLOSE); - /* free sprite memory */ - if (IsMaster(dev) && dev->spriteInfo->sprite) + FreeSprite(dev); + + if (IsMaster(dev)) screen->DeviceCursorCleanup(dev, screen); /* free acceleration info */ @@ -968,8 +969,6 @@ CloseDevice(DeviceIntPtr dev) free(classes); } - FreeSprite(dev); - /* a client may have the device set as client pointer */ for (j = 0; j < currentMaxClients; j++) { if (clients[j] && clients[j]->clientPtr == dev) { diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 7e7a1c9eb..b8c67fdfc 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -3237,7 +3237,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) pCursor = RefCursor(pCursor); if (pSprite->current) FreeCursor(pSprite->current, None); - pSprite->current = RefCursor(pCursor); + pSprite->current = pCursor; if (pScreen) { (*pScreen->RealizeCursor) (pDev, pScreen, pSprite->current); |