xnest: drop superfluous xnestCursorScreenKey define

We can just write &xnestCursorScreenKeyRec instead, which makes the code
a bit more clear.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1342>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-02-28 13:04:02 +01:00 committed by Marge Bot
parent 7f13fc7d2f
commit 22306f16b6
3 changed files with 3 additions and 5 deletions

View File

@ -156,7 +156,7 @@ xnestDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
xnestCursorFuncPtr pScreenPriv;
pScreenPriv = (xnestCursorFuncPtr)
dixLookupPrivate(&pScreen->devPrivates, xnestCursorScreenKey);
dixLookupPrivate(&pScreen->devPrivates, &xnestCursorScreenKeyRec);
return pScreenPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen);
}
@ -167,7 +167,7 @@ xnestDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
xnestCursorFuncPtr pScreenPriv;
pScreenPriv = (xnestCursorFuncPtr)
dixLookupPrivate(&pScreen->devPrivates, xnestCursorScreenKey);
dixLookupPrivate(&pScreen->devPrivates, &xnestCursorScreenKeyRec);
pScreenPriv->spriteFuncs->DeviceCursorCleanup(pDev, pScreen);
}

View File

@ -312,7 +312,7 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[])
miDCInitialize(pScreen, &xnestPointerCursorFuncs); /* init SW rendering */
PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
xnestCursorFuncs.spriteFuncs = PointPriv->spriteFuncs;
dixSetPrivate(&pScreen->devPrivates, xnestCursorScreenKey,
dixSetPrivate(&pScreen->devPrivates, &xnestCursorScreenKeyRec,
&xnestCursorFuncs);
PointPriv->spriteFuncs = &xnestPointerSpriteFuncs;

View File

@ -22,8 +22,6 @@ typedef struct {
} xnestCursorFuncRec, *xnestCursorFuncPtr;
extern DevPrivateKeyRec xnestCursorScreenKeyRec;
#define xnestCursorScreenKey (&xnestCursorScreenKeyRec)
extern xnestCursorFuncRec xnestCursorFuncs;
typedef struct {