xfixes: realize the invisible cursor before displaying it.

AllocARGBCursor realizes the cursor but can only do so if we have devices
there already. If we don't - then the cursor needs to be realized elsewhere.
This is usually done in InitializeSprite, but since xfixes just hard-swaps the
(realized) cursor to the InvisibleCursor, we need to manually realize it
before trying to display it.
This commit is contained in:
Peter Hutterer 2008-09-25 11:03:22 +09:30
parent e58be0f342
commit feaa5fa671

View File

@ -142,7 +142,8 @@ CursorDisplayCursor (DeviceIntPtr pDev,
CursorVisible = TRUE;
if (cs->pCursorHideCounts != NULL || !CursorVisible) {
ret = (*pScreen->DisplayCursor) (pDev, pScreen, pInvisibleCursor);
ret = ((*pScreen->RealizeCursor)(pDev, pScreen, pInvisibleCursor) &&
(*pScreen->DisplayCursor) (pDev, pScreen, pInvisibleCursor));
} else {
ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor);
}