diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-03-16 11:11:43 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-05-02 14:53:06 +0200 |
commit | 63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4 (patch) | |
tree | 3d67994a85c5d8c3a929ab315fbcb617baa6423d /nx-X11/programs/Xserver/dix | |
parent | 28ba877803d8383eac282b873b8e0bb50c8db46b (diff) | |
download | nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.tar.gz nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.tar.bz2 nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.zip |
Rename region macros to eliminate screen argument
This is a huge mechanical patch and a few small fixups required to finish
the job. They were reviewed separately, but because the server does not
build without both pieces, I've merged them together at this time.
The mechanical changes were performed by running the included
'fix-region' script over the whole nx-X11/programs/Xserver tree:
$ cd nx-X11/programs/Xserver && ( git ls-files | grep -v '^fix-' | xargs ./fix-region; )
And then, the white space errors in the resulting patch were fixed
using the provided fix-patch-whitespace script.
$ sh ./fix-patch-whitespace
Thanks to Jamey Sharp for the mighty fine sed-generating sed script.
v1: Keith Packard <keithp@keithp.com> (X.Org xserver commit: 2dc138922b7588515d5f2447e4b9dcdc0bef15e0)
v2: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> (apply fix-region script to nx-libs)
Diffstat (limited to 'nx-X11/programs/Xserver/dix')
-rw-r--r-- | nx-X11/programs/Xserver/dix/dispatch.c | 12 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/events.c | 62 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/dix/window.c | 112 |
3 files changed, 93 insertions, 93 deletions
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index b6010e627..009e1ac08 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -1266,11 +1266,11 @@ ProcTranslateCoords(register ClientPtr client) * borderSize */ && (!wBoundingShape(pWin) || - POINT_IN_REGION(pWin->drawable.pScreen, + RegionContainsPoint( &pWin->borderSize, x, y, &box)) && (!wInputShape(pWin) || - POINT_IN_REGION(pWin->drawable.pScreen, + RegionContainsPoint( wInputShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box)) @@ -1758,7 +1758,7 @@ ProcCopyArea(register ClientPtr client) (*pDst->pScreen->SendGraphicsExpose) (client, pRgn, stuff->dstDrawable, X_CopyArea, 0); if (pRgn) - REGION_DESTROY(pDst->pScreen, pRgn); + RegionDestroy(pRgn); } return(client->noClientException); @@ -1806,7 +1806,7 @@ ProcCopyPlane(register ClientPtr client) (*pdstDraw->pScreen->SendGraphicsExpose) (client, pRgn, stuff->dstDrawable, X_CopyPlane, 0); if (pRgn) - REGION_DESTROY(pdstDraw->pScreen, pRgn); + RegionDestroy(pRgn); } return(client->noClientException); } @@ -2228,7 +2228,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable, pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw); if (pVisibleRegion) { - REGION_TRANSLATE(pDraw->pScreen, pVisibleRegion, -pDraw->x, -pDraw->y); + RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y); } } #endif @@ -2322,7 +2322,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable, } #ifdef XCSECURITY if (pVisibleRegion) - REGION_DESTROY(pDraw->pScreen, pVisibleRegion); + RegionDestroy(pVisibleRegion); #endif if (!im_return) DEALLOCATE_LOCAL(pBuf); diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c index 1166bf84b..3163270f4 100644 --- a/nx-X11/programs/Xserver/dix/events.c +++ b/nx-X11/programs/Xserver/dix/events.c @@ -346,14 +346,14 @@ XineramaSetCursorPosition( x += panoramiXdataPtr[0].x; y += panoramiXdataPtr[0].y; - if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum], + if(!RegionContainsPoint(&XineramaScreenRegions[pScreen->myNum], x, y, &box)) { FOR_NSCREENS(i) { if(i == pScreen->myNum) continue; - if(POINT_IN_REGION(pScreen, &XineramaScreenRegions[i], x, y, &box)) + if(RegionContainsPoint(&XineramaScreenRegions[i], x, y, &box)) { pScreen = screenInfo.screens[i]; break; @@ -483,7 +483,7 @@ XineramaCheckVirtualMotion( i = PanoramiXNumScreens - 1; - REGION_COPY(sprite.screen, &sprite.Reg2, + RegionCopy(&sprite.Reg2, &sprite.windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; @@ -493,16 +493,16 @@ XineramaCheckVirtualMotion( y = off_y - panoramiXdataPtr[i].y; if(x || y) - REGION_TRANSLATE(sprite.screen, &sprite.Reg2, x, y); + RegionTranslate(&sprite.Reg2, x, y); - REGION_UNION(sprite.screen, &sprite.Reg2, &sprite.Reg2, + RegionUnion(&sprite.Reg2, &sprite.Reg2, &sprite.windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; } - lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2); + lims = *RegionExtents(&sprite.Reg2); if (sprite.hot.x < lims.x1) #ifdef XEVIE @@ -525,7 +525,7 @@ XineramaCheckVirtualMotion( #endif sprite.hot.y = lims.y2 - 1; - if (REGION_NUM_RECTS(&sprite.Reg2) > 1) + if (RegionNumRects(&sprite.Reg2) > 1) ConfineToShape(&sprite.Reg2, &sprite.hot.x, &sprite.hot.y); if (qe) @@ -632,7 +632,7 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents) i = PanoramiXNumScreens - 1; - REGION_COPY(sprite.screen, &sprite.Reg1, + RegionCopy(&sprite.Reg1, &sprite.windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; @@ -642,18 +642,18 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents) y = off_y - panoramiXdataPtr[i].y; if(x || y) - REGION_TRANSLATE(sprite.screen, &sprite.Reg1, x, y); + RegionTranslate(&sprite.Reg1, x, y); - REGION_UNION(sprite.screen, &sprite.Reg1, &sprite.Reg1, + RegionUnion(&sprite.Reg1, &sprite.Reg1, &sprite.windows[i]->borderSize); off_x = panoramiXdataPtr[i].x; off_y = panoramiXdataPtr[i].y; } - sprite.hotLimits = *REGION_EXTENTS(sprite.screen, &sprite.Reg1); + sprite.hotLimits = *RegionExtents(&sprite.Reg1); - if(REGION_NUM_RECTS(&sprite.Reg1) > 1) + if(RegionNumRects(&sprite.Reg1) > 1) sprite.hotShape = &sprite.Reg1; else sprite.hotShape = NullRegion; @@ -732,9 +732,9 @@ ConfineToShape(RegionPtr shape, int *px, int *py) int x = *px, y = *py; int incx = 1, incy = 1; - if (POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box)) + if (RegionContainsPoint(shape, x, y, &box)) return; - box = *REGION_EXTENTS(sprite.hot.pScreen, shape); + box = *RegionExtents(shape); /* this is rather crude */ do { x += incx; @@ -756,7 +756,7 @@ ConfineToShape(RegionPtr shape, int *px, int *py) else if (y < box.y1) return; /* should never get here! */ } - } while (!POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box)); + } while (!RegionContainsPoint(shape, x, y, &box)); *px = x; *py = y; } @@ -844,7 +844,7 @@ CheckVirtualMotion( #endif sprite.hot.x = sprite.hot.y = 0; } - lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize); + lims = *RegionExtents(&pWin->borderSize); if (sprite.hot.x < lims.x1) #ifdef XEVIE xeviehot.x = @@ -898,7 +898,7 @@ ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen) } else { - sprite.hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize); + sprite.hotLimits = *RegionExtents(&pWin->borderSize); #ifdef SHAPE sprite.hotShape = wBoundingShape(pWin) ? &pWin->borderSize : NullRegion; @@ -1972,7 +1972,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y) { BoxRec box; - if(POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderSize, x, y, &box)) + if(RegionContainsPoint(&pWin->borderSize, x, y, &box)) return TRUE; #ifdef PANORAMIX @@ -1980,7 +1980,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y) int i; for(i = 1; i < PanoramiXNumScreens; i++) { - if(POINT_IN_REGION(sprite.screen, + if(RegionContainsPoint( &sprite.windows[i]->borderSize, x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x, y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y, @@ -2016,7 +2016,7 @@ XYToWindow(int x, int y) */ && (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y)) && (!wInputShape(pWin) || - POINT_IN_REGION(pWin->drawable.pScreen, + RegionContainsPoint( wInputShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box)) @@ -2156,10 +2156,10 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) sprite.hotLimits.x2 -= xoff; sprite.hotLimits.y2 -= yoff; - if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg1)) - REGION_TRANSLATE(sprite.screen, &sprite.Reg1, xoff, yoff); - if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg2)) - REGION_TRANSLATE(sprite.screen, &sprite.Reg2, xoff, yoff); + if (RegionNotEmpty(&sprite.Reg1)) + RegionTranslate(&sprite.Reg1, xoff, yoff); + if (RegionNotEmpty(&sprite.Reg2)) + RegionTranslate(&sprite.Reg2, xoff, yoff); /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ if ((grab = inputInfo.pointer->grab) && grab->confineTo) { @@ -2211,8 +2211,8 @@ DefineInitialRootWindow(register WindowPtr win) #endif sprite.screen = pScreen; /* gotta UNINIT these someplace */ - REGION_NULL(pScreen, &sprite.Reg1); - REGION_NULL(pScreen, &sprite.Reg2); + RegionNull(&sprite.Reg1); + RegionNull(&sprite.Reg2); } #endif } @@ -2278,7 +2278,7 @@ XineramaPointInWindowIsVisible( if (!pWin->realized) return FALSE; - if (POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)) + if (RegionContainsPoint(&pWin->borderClip, x, y, &box)) return TRUE; if(!XineramaSetWindowPntrs(pWin)) return FALSE; @@ -2292,9 +2292,9 @@ XineramaPointInWindowIsVisible( x = xoff - panoramiXdataPtr[i].x; y = yoff - panoramiXdataPtr[i].y; - if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box) + if(RegionContainsPoint(&pWin->borderClip, x, y, &box) && (!wInputShape(pWin) || - POINT_IN_REGION(pWin->drawable.pScreen, + RegionContainsPoint( wInputShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box))) @@ -2470,7 +2470,7 @@ ProcWarpPointer(ClientPtr client) static Bool BorderSizeNotEmpty(WindowPtr pWin) { - if(REGION_NOTEMPTY(sprite.hotPhys.pScreen, &pWin->borderSize)) + if(RegionNotEmpty(&pWin->borderSize)) return TRUE; #ifdef PANORAMIX @@ -2478,7 +2478,7 @@ BorderSizeNotEmpty(WindowPtr pWin) int i; for(i = 1; i < PanoramiXNumScreens; i++) { - if(REGION_NOTEMPTY(sprite.screen, &sprite.windows[i]->borderSize)) + if(RegionNotEmpty(&sprite.windows[i]->borderSize)) return TRUE; } } diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c index 5854f2e95..ce94dc8a5 100644 --- a/nx-X11/programs/Xserver/dix/window.c +++ b/nx-X11/programs/Xserver/dix/window.c @@ -439,10 +439,10 @@ CreateRootWindow(ScreenPtr pScreen) box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; - REGION_INIT(pScreen, &pWin->clipList, &box, 1); - REGION_INIT(pScreen, &pWin->winSize, &box, 1); - REGION_INIT(pScreen, &pWin->borderSize, &box, 1); - REGION_INIT(pScreen, &pWin->borderClip, &box, 1); + RegionInit(&pWin->clipList, &box, 1); + RegionInit(&pWin->winSize, &box, 1); + RegionInit(&pWin->borderSize, &box, 1); + RegionInit(&pWin->borderClip, &box, 1); pWin->drawable.class = InputOutput; pWin->optional->visual = pScreen->rootVisual; @@ -515,7 +515,7 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn, ScreenPtr pScreen = pWin->drawable.pScreen; BoxRec box; - box = *(REGION_EXTENTS(pScreen, &pWin->winSize)); + box = *(RegionExtents(&pWin->winSize)); /* we do these calculations to avoid overflows */ if (x > box.x1) box.x1 = x; @@ -531,8 +531,8 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn, box.x2 = box.x1; if (box.y1 > box.y2) box.y2 = box.y1; - REGION_RESET(pScreen, Rgn, &box); - REGION_INTERSECT(pScreen, Rgn, Rgn, &pWin->winSize); + RegionReset(Rgn, &box); + RegionIntersect(Rgn, Rgn, &pWin->winSize); } WindowPtr @@ -713,10 +713,10 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w, pWin->drawable.y = pParent->drawable.y + y + (int)bw; /* set up clip list correctly for unobscured WindowPtr */ - REGION_NULL(pScreen, &pWin->clipList); - REGION_NULL(pScreen, &pWin->borderClip); - REGION_NULL(pScreen, &pWin->winSize); - REGION_NULL(pScreen, &pWin->borderSize); + RegionNull(&pWin->clipList); + RegionNull(&pWin->borderClip); + RegionNull(&pWin->winSize); + RegionNull(&pWin->borderSize); pHead = RealChildHead(pParent); if (pHead) @@ -797,17 +797,17 @@ FreeWindowResources(register WindowPtr pWin) DeleteWindowFromAnySaveSet(pWin); DeleteWindowFromAnySelections(pWin); DeleteWindowFromAnyEvents(pWin, TRUE); - REGION_UNINIT(pScreen, &pWin->clipList); - REGION_UNINIT(pScreen, &pWin->winSize); - REGION_UNINIT(pScreen, &pWin->borderClip); - REGION_UNINIT(pScreen, &pWin->borderSize); + RegionUninit(&pWin->clipList); + RegionUninit(&pWin->winSize); + RegionUninit(&pWin->borderClip); + RegionUninit(&pWin->borderSize); #ifdef SHAPE if (wBoundingShape (pWin)) - REGION_DESTROY(pScreen, wBoundingShape (pWin)); + RegionDestroy(wBoundingShape (pWin)); if (wClipShape (pWin)) - REGION_DESTROY(pScreen, wClipShape (pWin)); + RegionDestroy(wClipShape (pWin)); if (wInputShape (pWin)) - REGION_DESTROY(pScreen, wInputShape (pWin)); + RegionDestroy(wInputShape (pWin)); #endif if (pWin->borderIsPixel == FALSE) (*pScreen->DestroyPixmap)(pWin->border.pixmap); @@ -1467,10 +1467,10 @@ PatchUp: { RegionRec exposed; - REGION_NULL(pScreen, &exposed); - REGION_SUBTRACT(pScreen, &exposed, &pWin->borderClip, &pWin->winSize); + RegionNull(&exposed); + RegionSubtract(&exposed, &pWin->borderClip, &pWin->winSize); (*pWin->drawable.pScreen->PaintWindowBorder)(pWin, &exposed, PW_BORDER); - REGION_UNINIT(pScreen, &exposed); + RegionUninit(&exposed); } return error; } @@ -1611,18 +1611,18 @@ CreateUnclippedWinSize (register WindowPtr pWin) box.y1 = pWin->drawable.y; box.x2 = pWin->drawable.x + (int) pWin->drawable.width; box.y2 = pWin->drawable.y + (int) pWin->drawable.height; - pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1); + pRgn = RegionCreate(&box, 1); #ifdef SHAPE if (wBoundingShape (pWin) || wClipShape (pWin)) { ScreenPtr pScreen = pWin->drawable.pScreen; - REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x, + RegionTranslate(pRgn, - pWin->drawable.x, - pWin->drawable.y); if (wBoundingShape (pWin)) - REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin)); + RegionIntersect(pRgn, pRgn, wBoundingShape (pWin)); if (wClipShape (pWin)) - REGION_INTERSECT(pScreen, pRgn, pRgn, wClipShape (pWin)); - REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x, pWin->drawable.y); + RegionIntersect(pRgn, pRgn, wClipShape (pWin)); + RegionTranslate(pRgn, pWin->drawable.x, pWin->drawable.y); } #endif return pRgn; @@ -1640,7 +1640,7 @@ SetWinSize (register WindowPtr pWin) box.y1 = pWin->drawable.y; box.x2 = pWin->drawable.x + pWin->drawable.width; box.y2 = pWin->drawable.y + pWin->drawable.height; - REGION_RESET (pScreen, &pWin->winSize, &box); + RegionReset(&pWin->winSize, &box); } else #endif @@ -1652,15 +1652,15 @@ SetWinSize (register WindowPtr pWin) if (wBoundingShape (pWin) || wClipShape (pWin)) { ScreenPtr pScreen = pWin->drawable.pScreen; - REGION_TRANSLATE(pScreen, &pWin->winSize, - pWin->drawable.x, + RegionTranslate(&pWin->winSize, - pWin->drawable.x, - pWin->drawable.y); if (wBoundingShape (pWin)) - REGION_INTERSECT(pScreen, &pWin->winSize, &pWin->winSize, + RegionIntersect(&pWin->winSize, &pWin->winSize, wBoundingShape (pWin)); if (wClipShape (pWin)) - REGION_INTERSECT(pScreen, &pWin->winSize, &pWin->winSize, + RegionIntersect(&pWin->winSize, &pWin->winSize, wClipShape (pWin)); - REGION_TRANSLATE(pScreen, &pWin->winSize, pWin->drawable.x, + RegionTranslate(&pWin->winSize, pWin->drawable.x, pWin->drawable.y); } #endif @@ -1682,7 +1682,7 @@ SetBorderSize (register WindowPtr pWin) box.y1 = pWin->drawable.y - bw; box.x2 = pWin->drawable.x + pWin->drawable.width + bw; box.y2 = pWin->drawable.y + pWin->drawable.height + bw; - REGION_RESET (pScreen, &pWin->borderSize, &box); + RegionReset(&pWin->borderSize, &box); } else #endif @@ -1694,18 +1694,18 @@ SetBorderSize (register WindowPtr pWin) if (wBoundingShape (pWin)) { ScreenPtr pScreen = pWin->drawable.pScreen; - REGION_TRANSLATE(pScreen, &pWin->borderSize, - pWin->drawable.x, + RegionTranslate(&pWin->borderSize, - pWin->drawable.x, - pWin->drawable.y); - REGION_INTERSECT(pScreen, &pWin->borderSize, &pWin->borderSize, + RegionIntersect(&pWin->borderSize, &pWin->borderSize, wBoundingShape (pWin)); - REGION_TRANSLATE(pScreen, &pWin->borderSize, pWin->drawable.x, + RegionTranslate(&pWin->borderSize, pWin->drawable.x, pWin->drawable.y); - REGION_UNION(pScreen, &pWin->borderSize, &pWin->borderSize, + RegionUnion(&pWin->borderSize, &pWin->borderSize, &pWin->winSize); } #endif } else { - REGION_COPY(pWin->drawable.pScreen, &pWin->borderSize, + RegionCopy(&pWin->borderSize, &pWin->winSize); } } @@ -1905,12 +1905,12 @@ MakeBoundingRegion ( RegionPtr pRgn; ScreenPtr pScreen = pWin->drawable.pScreen; - pRgn = REGION_CREATE(pScreen, pBox, 1); + pRgn = RegionCreate(pBox, 1); if (wBoundingShape (pWin)) { - REGION_TRANSLATE(pScreen, pRgn, -pWin->origin.x, + RegionTranslate(pRgn, -pWin->origin.x, -pWin->origin.y); - REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin)); - REGION_TRANSLATE(pScreen, pRgn, pWin->origin.x, + RegionIntersect(pRgn, pRgn, wBoundingShape (pWin)); + RegionTranslate(pRgn, pWin->origin.x, pWin->origin.y); } return pRgn; @@ -1932,10 +1932,10 @@ ShapeOverlap ( pScreen = pWin->drawable.pScreen; pWinRgn = MakeBoundingRegion (pWin, pWinBox); pSibRgn = MakeBoundingRegion (pSib, pSibBox); - REGION_INTERSECT(pScreen, pWinRgn, pWinRgn, pSibRgn); - ret = REGION_NOTEMPTY(pScreen, pWinRgn); - REGION_DESTROY(pScreen, pWinRgn); - REGION_DESTROY(pScreen, pSibRgn); + RegionIntersect(pWinRgn, pWinRgn, pSibRgn); + ret = RegionNotEmpty(pWinRgn); + RegionDestroy(pWinRgn); + RegionDestroy(pSibRgn); return ret; } #endif @@ -2066,7 +2066,7 @@ WhereDoIGoInTheStack( else if (pSib) { if ((IsSiblingAboveMe(pWin, pSib) == Above) && - (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT)) + (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT)) return(pFirst); else return(pWin->nextSib); @@ -2081,7 +2081,7 @@ WhereDoIGoInTheStack( else if (pSib) { if ((IsSiblingAboveMe(pWin, pSib) == Below) && - (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT)) + (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT)) return NullWindow; else return(pWin->nextSib); @@ -2095,7 +2095,7 @@ WhereDoIGoInTheStack( return(pWin->nextSib); else if (pSib) { - if (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT) + if (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT) { if (IsSiblingAboveMe(pWin, pSib) == Above) return(pFirst); @@ -2785,10 +2785,10 @@ MapWindow(register WindowPtr pWin, ClientPtr client) (*pScreen->ClipNotify) (pWin, 0, 0); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree)(NullWindow, pWin, VTMap); - REGION_NULL(pScreen, &temp); - REGION_COPY(pScreen, &temp, &pWin->clipList); + RegionNull(&temp); + RegionCopy(&temp, &pWin->clipList); (*pScreen->WindowExposures) (pWin, &temp, NullRegion); - REGION_UNINIT(pScreen, &temp); + RegionUninit(&temp); } return(Success); @@ -3184,7 +3184,7 @@ VisibleBoundingBoxFromPoint(register WindowPtr pWin, int x, int y, BoxPtr box) { if (!pWin->realized) return (FALSE); - if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->clipList, x, y, box)) + if (RegionContainsPoint(&pWin->clipList, x, y, box)) return(TRUE); return(FALSE); } @@ -3200,10 +3200,10 @@ PointInWindowIsVisible(register WindowPtr pWin, int x, int y) if (!pWin->realized) return (FALSE); - if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderClip, + if (RegionContainsPoint(&pWin->borderClip, x, y, &box) && (!wInputShape(pWin) || - POINT_IN_REGION(pWin->drawable.pScreen, + RegionContainsPoint( wInputShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box))) @@ -3219,12 +3219,12 @@ NotClippedByChildren(register WindowPtr pWin) RegionPtr pReg; pScreen = pWin->drawable.pScreen; - pReg = REGION_CREATE(pScreen, NullBox, 1); + pReg = RegionCreate(NullBox, 1); if (pWin->parent || screenIsSaved != SCREEN_SAVER_ON || !HasSaverWindow (pWin->drawable.pScreen->myNum)) { - REGION_INTERSECT(pScreen, pReg, &pWin->borderClip, &pWin->winSize); + RegionIntersect(pReg, &pWin->borderClip, &pWin->winSize); } return(pReg); } |