From 22306f16b6cbeb68ebf2e4423b5b5c51ec88ffb0 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 28 Feb 2024 13:04:02 +0100 Subject: [PATCH] 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 Part-of: --- hw/xnest/Cursor.c | 4 ++-- hw/xnest/Screen.c | 2 +- hw/xnest/XNCursor.h | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c index 285e10ebf..e48bd56d4 100644 --- a/hw/xnest/Cursor.c +++ b/hw/xnest/Cursor.c @@ -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); } diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index ac01c248c..a078a8be3 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -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; diff --git a/hw/xnest/XNCursor.h b/hw/xnest/XNCursor.h index 1a3c6f44e..ca4225529 100644 --- a/hw/xnest/XNCursor.h +++ b/hw/xnest/XNCursor.h @@ -22,8 +22,6 @@ typedef struct { } xnestCursorFuncRec, *xnestCursorFuncPtr; extern DevPrivateKeyRec xnestCursorScreenKeyRec; - -#define xnestCursorScreenKey (&xnestCursorScreenKeyRec) extern xnestCursorFuncRec xnestCursorFuncs; typedef struct {