Xnest: use XCB*_NONE instead of None
Use xcb's defines instead of Xlib's ones. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
60db30f517
commit
b00f66ca53
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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++)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,5 +62,5 @@ xnestDefaultVisualColormap(Visual * visual)
|
|||
if (xnestVisuals[i].visual == visual)
|
||||
return xnestDefaultColormaps[i];
|
||||
|
||||
return None;
|
||||
return XCB_WINDOW_NONE;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue