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

View File

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

View File

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