From b00f66ca53cb1120b963406343969ec8262ac9dd Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 12 Aug 2024 14:30:45 +0200 Subject: [PATCH] Xnest: use XCB*_NONE instead of None Use xcb's defines instead of Xlib's ones. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/Color.c | 4 ++-- hw/xnest/Cursor.c | 2 +- hw/xnest/Display.c | 2 +- hw/xnest/GC.c | 4 ++-- hw/xnest/Visual.c | 2 +- hw/xnest/Window.c | 14 +++++++------- hw/xnest/XNWindow.h | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/xnest/Color.c b/hw/xnest/Color.c index da642a608..d2f3fab92 100644 --- a/hw/xnest/Color.c +++ b/hw/xnest/Color.c @@ -137,7 +137,7 @@ xnestDestroyColormap(ColormapPtr pCmap) } #define SEARCH_PREDICATE \ - (xnestWindow(pWin) != None && wColormap(pWin) == icws->cmapIDs[i]) + (xnestWindow(pWin) != XCB_WINDOW_NONE && wColormap(pWin) == icws->cmapIDs[i]) static int xnestCountInstalledColormapWindows(WindowPtr pWin, void *ptr) @@ -352,7 +352,7 @@ xnestInstallColormap(ColormapPtr pCmap) xnestDirectUninstallColormaps(pCmap->pScreen); /* Uninstall pInstalledMap. Notify all interested parties. */ - if (pOldCmap != (ColormapPtr) None) + if (pOldCmap != (ColormapPtr) XCB_COLORMAP_NONE) WalkTree(pCmap->pScreen, TellLostMap, (void *) &pOldCmap->mid); SetInstalledColormap(pCmap->pScreen, pCmap); diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c index 89f508709..8a54cf834 100644 --- a/hw/xnest/Cursor.c +++ b/hw/xnest/Cursor.c @@ -52,7 +52,7 @@ xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) values.plane_mask = AllPlanes; values.foreground = 1L; values.background = 0L; - values.clip_mask = None; + values.clip_mask = XCB_PIXMAP_NONE; XChangeGC(xnestDisplay, xnestBitmapGC, valuemask, &values); diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c index 284706842..8a92885db 100644 --- a/hw/xnest/Display.c +++ b/hw/xnest/Display.c @@ -141,7 +141,7 @@ xnestOpenDisplay(int argc, char *argv[]) xnestEventMask = 0L; for (i = 0; i <= MAXDEPTH; i++) - xnestDefaultDrawables[i] = None; + xnestDefaultDrawables[i] = XCB_WINDOW_NONE; for (i = 0; i < xnestNumPixmapFormats; i++) for (j = 0; j < xnestNumDepths; j++) diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c index 0cc8d5a90..967a008e8 100644 --- a/hw/xnest/GC.c +++ b/hw/xnest/GC.c @@ -197,7 +197,7 @@ xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects) switch (type) { case CT_NONE: - XSetClipMask(xnestDisplay, xnestGC(pGC), None); + XSetClipMask(xnestDisplay, xnestGC(pGC), XCB_PIXMAP_NONE); pValue = NULL; break; @@ -277,7 +277,7 @@ xnestDestroyClip(GCPtr pGC) { if (pGC->clientClip) { RegionDestroy(pGC->clientClip); - XSetClipMask(xnestDisplay, xnestGC(pGC), None); + XSetClipMask(xnestDisplay, xnestGC(pGC), XCB_PIXMAP_NONE); pGC->clientClip = NULL; } } diff --git a/hw/xnest/Visual.c b/hw/xnest/Visual.c index 37a6ac6cf..57e420a1c 100644 --- a/hw/xnest/Visual.c +++ b/hw/xnest/Visual.c @@ -62,5 +62,5 @@ xnestDefaultVisualColormap(Visual * visual) if (xnestVisuals[i].visual == visual) return xnestDefaultColormaps[i]; - return None; + return XCB_WINDOW_NONE; } diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index 49f84ab30..7715dec81 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -132,7 +132,7 @@ xnestCreateWindow(WindowPtr pWin) xnestWindowPriv(pWin)->width = pWin->drawable.width; xnestWindowPriv(pWin)->height = pWin->drawable.height; xnestWindowPriv(pWin)->border_width = pWin->borderWidth; - xnestWindowPriv(pWin)->sibling_above = None; + xnestWindowPriv(pWin)->sibling_above = XCB_WINDOW_NONE; if (pWin->nextSib) xnestWindowPriv(pWin->nextSib)->sibling_above = xnestWindow(pWin); xnestWindowPriv(pWin)->bounding_shape = RegionCreate(NULL, 1); @@ -153,7 +153,7 @@ xnestDestroyWindow(WindowPtr pWin) RegionDestroy(xnestWindowPriv(pWin)->bounding_shape); RegionDestroy(xnestWindowPriv(pWin)->clip_shape); XDestroyWindow(xnestDisplay, xnestWindow(pWin)); - xnestWindowPriv(pWin)->window = None; + xnestWindowPriv(pWin)->window = XCB_WINDOW_NONE; if (pWin->optional && pWin->optional->colormap && pWin->parent) xnestSetInstalledColormapWindows(pWin->drawable.pScreen); @@ -190,7 +190,7 @@ xnestConfigureWindow(WindowPtr pWin, unsigned int mask) xnestWindowPriv(pWin)->parent = xnestWindowParent(pWin); xnestWindowPriv(pWin)->x = pWin->origin.x - wBorderWidth(pWin); xnestWindowPriv(pWin)->y = pWin->origin.y - wBorderWidth(pWin); - xnestWindowPriv(pWin)->sibling_above = None; + xnestWindowPriv(pWin)->sibling_above = XCB_WINDOW_NONE; if (pWin->nextSib) xnestWindowPriv(pWin->nextSib)->sibling_above = xnestWindow(pWin); } @@ -243,7 +243,7 @@ xnestConfigureWindow(WindowPtr pWin, unsigned int mask) valuemask = XCB_CONFIG_WINDOW_STACK_MODE; values.stack_mode = Above; XConfigureWindow(xnestDisplay, xnestWindow(pSib), valuemask, &values); - xnestWindowPriv(pSib)->sibling_above = None; + xnestWindowPriv(pSib)->sibling_above = XCB_WINDOW_NONE; /* the rest of siblings */ for (pSib = pSib->nextSib; pSib != NullWindow; pSib = pSib->nextSib) { @@ -266,7 +266,7 @@ xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask) if (mask & XCB_CW_BACK_PIXMAP) switch (pWin->backgroundState) { case XCB_BACK_PIXMAP_NONE: - attributes.background_pixmap = None; + attributes.background_pixmap = XCB_PIXMAP_NONE; break; case XCB_BACK_PIXMAP_PARENT_RELATIVE: @@ -486,7 +486,7 @@ xnestShapeWindow(WindowPtr pWin) RegionEmpty(xnestWindowPriv(pWin)->bounding_shape); XShapeCombineMask(xnestDisplay, xnestWindow(pWin), - ShapeBounding, 0, 0, None, ShapeSet); + ShapeBounding, 0, 0, XCB_PIXMAP_NONE, ShapeSet); } } @@ -513,7 +513,7 @@ xnestShapeWindow(WindowPtr pWin) RegionEmpty(xnestWindowPriv(pWin)->clip_shape); XShapeCombineMask(xnestDisplay, xnestWindow(pWin), - ShapeClip, 0, 0, None, ShapeSet); + ShapeClip, 0, 0, XCB_PIXMAP_NONE, ShapeSet); } } } diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h index f7e32bb18..408da7ed4 100644 --- a/hw/xnest/XNWindow.h +++ b/hw/xnest/XNWindow.h @@ -50,10 +50,10 @@ extern DevPrivateKeyRec xnestWindowPrivateKeyRec; xnestDefaultWindows[pWin->drawable.pScreen->myNum]) #define xnestWindowSiblingAbove(pWin) \ - ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None) + ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : XCB_WINDOW_NONE) #define xnestWindowSiblingBelow(pWin) \ - ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None) + ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : XCB_WINDOW_NONE) WindowPtr xnestWindowPtr(Window window); Bool xnestCreateWindow(WindowPtr pWin);