xnest: fix naming of xnestCursorScreenKeyRec

It's naming is a bit unprecise: it actually is used for storing
xnestCursorFuncPtr inside a Screen. Thus rename it to
xnestScreenCursorFuncKeyRec to make it 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:11:57 +01:00 committed by Marge Bot
parent 22306f16b6
commit 7e22c033d0
3 changed files with 8 additions and 6 deletions

View File

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

View File

@ -44,7 +44,7 @@ is" without express or implied warranty.
Window xnestDefaultWindows[MAXSCREENS];
Window xnestScreenSaverWindows[MAXSCREENS];
DevPrivateKeyRec xnestCursorScreenKeyRec;
DevPrivateKeyRec xnestScreenCursorFuncKeyRec;
ScreenPtr
xnestScreen(Window window)
@ -155,7 +155,7 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[])
(&xnestColormapPrivateKeyRec, PRIVATE_COLORMAP,
sizeof(xnestPrivColormap)))
return FALSE;
if (!dixRegisterPrivateKey(&xnestCursorScreenKeyRec, PRIVATE_SCREEN, 0))
if (!dixRegisterPrivateKey(&xnestScreenCursorFuncKeyRec, PRIVATE_SCREEN, 0))
return FALSE;
visuals = xallocarray(xnestNumVisuals, sizeof(VisualRec));
@ -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, &xnestCursorScreenKeyRec,
dixSetPrivate(&pScreen->devPrivates, &xnestScreenCursorFuncKeyRec,
&xnestCursorFuncs);
PointPriv->spriteFuncs = &xnestPointerSpriteFuncs;

View File

@ -21,7 +21,9 @@ typedef struct {
miPointerSpriteFuncPtr spriteFuncs;
} xnestCursorFuncRec, *xnestCursorFuncPtr;
extern DevPrivateKeyRec xnestCursorScreenKeyRec;
// stores xnestCursorFuncRec in screen
extern DevPrivateKeyRec xnestScreenCursorFuncKeyRec;
extern xnestCursorFuncRec xnestCursorFuncs;
typedef struct {