diff options
author | Mihai Moldovan <ionic@ionic.de> | 2016-05-13 06:19:21 +0200 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2016-05-13 06:19:21 +0200 |
commit | aba2a534f630f5b65a53e0ea7cdba17b77263f87 (patch) | |
tree | 8c4e2be57984a1d9e6143944d080e19f6c3049ec /nx-X11/programs/Xserver/mi/mivaltree.c | |
parent | 6c6b6b962654ac3c15d27aafbe583ee74e4f2266 (diff) | |
parent | 52dc49607e244c0e39b5d7cbdb8b41755f078aac (diff) | |
download | nx-libs-aba2a534f630f5b65a53e0ea7cdba17b77263f87.tar.gz nx-libs-aba2a534f630f5b65a53e0ea7cdba17b77263f87.tar.bz2 nx-libs-aba2a534f630f5b65a53e0ea7cdba17b77263f87.zip |
Merge branch 'sunweaver-pr/nxagent-no-compiler-warnings' into arctica-3.6.x
Attributes GH PR #102: https://github.com/ArcticaProject/nx-libs/pull/102
Diffstat (limited to 'nx-X11/programs/Xserver/mi/mivaltree.c')
-rw-r--r-- | nx-X11/programs/Xserver/mi/mivaltree.c | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/nx-X11/programs/Xserver/mi/mivaltree.c b/nx-X11/programs/Xserver/mi/mivaltree.c index b9a42472f..73028a074 100644 --- a/nx-X11/programs/Xserver/mi/mivaltree.c +++ b/nx-X11/programs/Xserver/mi/mivaltree.c @@ -123,8 +123,8 @@ miShapedWindowIn (pScreen, universe, bounding, rect, x, y) Bool someIn, someOut; register int t, x1, y1, x2, y2; - nbox = REGION_NUM_RECTS (bounding); - boundBox = REGION_RECTS (bounding); + nbox = RegionNumRects (bounding); + boundBox = RegionRects (bounding); someIn = someOut = FALSE; x1 = rect->x1; y1 = rect->y1; @@ -148,7 +148,7 @@ miShapedWindowIn (pScreen, universe, bounding, rect, x, y) box.x2 = box.x1; if (box.y1 > box.y2) box.y2 = box.y1; - switch (RECT_IN_REGION(pScreen, universe, &box)) + switch (RegionContainsRect(universe, &box)) { case rgnIN: if (someOut) @@ -241,7 +241,7 @@ miComputeClips ( borderSize.y2 = dy; oldVis = pParent->visibility; - switch (RECT_IN_REGION( pScreen, universe, &borderSize)) + switch (RegionContainsRect(universe, &borderSize)) { case rgnIN: newVis = VisibilityUnobscured; @@ -287,7 +287,7 @@ miComputeClips ( { if (miSetRedirectBorderClipProc) (*miSetRedirectBorderClipProc) (pParent, universe); - REGION_COPY(pScreen, universe, &pParent->borderSize); + RegionCopy(universe, &pParent->borderSize); } #endif @@ -315,9 +315,9 @@ miComputeClips ( { if (pChild->visibility != VisibilityFullyObscured) { - REGION_TRANSLATE( pScreen, &pChild->borderClip, + RegionTranslate(&pChild->borderClip, dx, dy); - REGION_TRANSLATE( pScreen, &pChild->clipList, + RegionTranslate(&pChild->clipList, dx, dy); pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; if (pScreen->ClipNotify) @@ -326,16 +326,16 @@ miComputeClips ( } if (pChild->valdata) { - REGION_NULL(pScreen, + RegionNull( &pChild->valdata->after.borderExposed); if (HasParentRelativeBorder(pChild)) { - REGION_SUBTRACT(pScreen, + RegionSubtract( &pChild->valdata->after.borderExposed, &pChild->borderClip, &pChild->winSize); } - REGION_NULL(pScreen, &pChild->valdata->after.exposed); + RegionNull(&pChild->valdata->after.exposed); } if (pChild->firstChild) { @@ -364,20 +364,20 @@ miComputeClips ( * We translate the old clipList because that will be exposed or copied * if gravity is right. */ - REGION_TRANSLATE( pScreen, &pParent->borderClip, dx, dy); - REGION_TRANSLATE( pScreen, &pParent->clipList, dx, dy); + RegionTranslate(&pParent->borderClip, dx, dy); + RegionTranslate(&pParent->clipList, dx, dy); } break; case VTBroken: - REGION_EMPTY (pScreen, &pParent->borderClip); - REGION_EMPTY (pScreen, &pParent->clipList); + RegionEmpty(&pParent->borderClip); + RegionEmpty(&pParent->clipList); break; } borderVisible = pParent->valdata->before.borderVisible; resized = pParent->valdata->before.resized; - REGION_NULL(pScreen, &pParent->valdata->after.borderExposed); - REGION_NULL(pScreen, &pParent->valdata->after.exposed); + RegionNull(&pParent->valdata->after.borderExposed); + RegionNull(&pParent->valdata->after.exposed); /* * Since the borderClip must not be clipped by the children, we do @@ -397,22 +397,22 @@ miComputeClips ( * of the border will be saved by DIX in borderVisible -- * use that region and destroy it */ - REGION_SUBTRACT( pScreen, exposed, universe, borderVisible); - REGION_DESTROY( pScreen, borderVisible); + RegionSubtract(exposed, universe, borderVisible); + RegionDestroy(borderVisible); } else { - REGION_SUBTRACT( pScreen, exposed, universe, &pParent->borderClip); + RegionSubtract(exposed, universe, &pParent->borderClip); } if (HasParentRelativeBorder(pParent) && (dx || dy)) - REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + RegionSubtract(&pParent->valdata->after.borderExposed, universe, &pParent->winSize); else - REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + RegionSubtract(&pParent->valdata->after.borderExposed, exposed, &pParent->winSize); - REGION_COPY( pScreen, &pParent->borderClip, universe); + RegionCopy(&pParent->borderClip, universe); /* * To get the right clipList for the parent, and to make doubly sure @@ -420,15 +420,15 @@ miComputeClips ( * border from the universe before proceeding. */ - REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize); + RegionIntersect(universe, universe, &pParent->winSize); } else - REGION_COPY( pScreen, &pParent->borderClip, universe); + RegionCopy(&pParent->borderClip, universe); if ((pChild = pParent->firstChild) && pParent->mapped) { - REGION_NULL(pScreen, &childUniverse); - REGION_NULL(pScreen, &childUnion); + RegionNull(&childUniverse); + RegionNull(&childUnion); if ((pChild->drawable.y < pParent->lastChild->drawable.y) || ((pChild->drawable.y == pParent->lastChild->drawable.y) && (pChild->drawable.x < pParent->lastChild->drawable.x))) @@ -436,7 +436,7 @@ miComputeClips ( for (; pChild; pChild = pChild->nextSib) { if (pChild->viewable) - REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + RegionAppend(&childUnion, &pChild->borderSize); } } else @@ -444,10 +444,10 @@ miComputeClips ( for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib) { if (pChild->viewable) - REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + RegionAppend(&childUnion, &pChild->borderSize); } } - REGION_VALIDATE( pScreen, &childUnion, &overlap); + RegionValidate(&childUnion, &overlap); for (pChild = pParent->firstChild; pChild; @@ -464,7 +464,7 @@ miComputeClips ( * Figure out the new universe from the child's * perspective and recurse. */ - REGION_INTERSECT( pScreen, &childUniverse, + RegionIntersect(&childUniverse, universe, &pChild->borderSize); miComputeClips (pChild, pScreen, &childUniverse, kind, @@ -476,14 +476,14 @@ miComputeClips ( * other sibling. */ if (overlap) - REGION_SUBTRACT( pScreen, universe, universe, + RegionSubtract(universe, universe, &pChild->borderSize); } } if (!overlap) - REGION_SUBTRACT( pScreen, universe, universe, &childUnion); - REGION_UNINIT( pScreen, &childUnion); - REGION_UNINIT( pScreen, &childUniverse); + RegionSubtract(universe, universe, &childUnion); + RegionUninit(&childUnion); + RegionUninit(&childUniverse); } /* if any children */ /* @@ -496,12 +496,12 @@ miComputeClips ( if (oldVis == VisibilityFullyObscured || oldVis == VisibilityNotViewable) { - REGION_COPY( pScreen, &pParent->valdata->after.exposed, universe); + RegionCopy(&pParent->valdata->after.exposed, universe); } else if (newVis != VisibilityFullyObscured && newVis != VisibilityNotViewable) { - REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed, + RegionSubtract(&pParent->valdata->after.exposed, universe, &pParent->clipList); } @@ -513,7 +513,7 @@ miComputeClips ( */ if (pParent->backStorage && !resized) { - REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe); + RegionSubtract(exposed, &pParent->clipList, universe); (* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy); } @@ -527,7 +527,7 @@ miComputeClips ( } #ifdef NOTDEF - REGION_COPY( pScreen, &pParent->clipList, universe); + RegionCopy(&pParent->clipList, universe); #endif pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; @@ -622,8 +622,8 @@ miValidateTree (pParent, pChild, kind) if (pChild == NullWindow) pChild = pParent->firstChild; - REGION_NULL(pScreen, &childClip); - REGION_NULL(pScreen, &exposed); + RegionNull(&childClip); + RegionNull(&exposed); /* * compute the area of the parent window occupied @@ -631,10 +631,10 @@ miValidateTree (pParent, pChild, kind) * is the area which can be divied up among the marked * children in their new configuration. */ - REGION_NULL(pScreen, &totalClip); + RegionNull(&totalClip); viewvals = 0; - if (REGION_BROKEN (pScreen, &pParent->clipList) && - !REGION_BROKEN (pScreen, &pParent->borderClip)) + if (RegionBroken(&pParent->clipList) && + !RegionBroken(&pParent->borderClip)) { kind = VTBroken; /* @@ -642,19 +642,19 @@ miValidateTree (pParent, pChild, kind) * assume everything is busted. */ forward = TRUE; - REGION_COPY (pScreen, &totalClip, &pParent->borderClip); - REGION_INTERSECT (pScreen, &totalClip, &totalClip, &pParent->winSize); + RegionCopy(&totalClip, &pParent->borderClip); + RegionIntersect(&totalClip, &totalClip, &pParent->winSize); for (pWin = pParent->firstChild; pWin != pChild; pWin = pWin->nextSib) { if (pWin->viewable) - REGION_SUBTRACT (pScreen, &totalClip, &totalClip, &pWin->borderSize); + RegionSubtract(&totalClip, &totalClip, &pWin->borderSize); } for (pWin = pChild; pWin; pWin = pWin->nextSib) if (pWin->valdata && pWin->viewable) viewvals++; - REGION_EMPTY (pScreen, &pParent->clipList); + RegionEmpty(&pParent->clipList); } else { @@ -672,7 +672,7 @@ miValidateTree (pParent, pChild, kind) if (pWin->redirectDraw && miGetRedirectBorderClipProc) pBorderClip = (*miGetRedirectBorderClipProc)(pWin); #endif - REGION_APPEND( pScreen, &totalClip, pBorderClip ); + RegionAppend(&totalClip, pBorderClip ); if (pWin->viewable) viewvals++; } @@ -691,7 +691,7 @@ miValidateTree (pParent, pChild, kind) if (pWin->redirectDraw && miGetRedirectBorderClipProc) pBorderClip = (*miGetRedirectBorderClipProc)(pWin); #endif - REGION_APPEND( pScreen, &totalClip, pBorderClip ); + RegionAppend(&totalClip, pBorderClip ); if (pWin->viewable) viewvals++; } @@ -700,7 +700,7 @@ miValidateTree (pParent, pChild, kind) pWin = pWin->prevSib; } } - REGION_VALIDATE( pScreen, &totalClip, &overlap); + RegionValidate(&totalClip, &overlap); } /* @@ -713,7 +713,7 @@ miValidateTree (pParent, pChild, kind) overlap = TRUE; if (kind != VTStack) { - REGION_UNION( pScreen, &totalClip, &totalClip, &pParent->clipList); + RegionUnion(&totalClip, &totalClip, &pParent->clipList); if (viewvals > 1) { /* @@ -723,12 +723,12 @@ miValidateTree (pParent, pChild, kind) * lower than the cost of multiple Subtracts in the * loop below. */ - REGION_NULL(pScreen, &childUnion); + RegionNull(&childUnion); if (forward) { for (pWin = pChild; pWin; pWin = pWin->nextSib) if (pWin->valdata && pWin->viewable) - REGION_APPEND( pScreen, &childUnion, + RegionAppend(&childUnion, &pWin->borderSize); } else @@ -737,16 +737,16 @@ miValidateTree (pParent, pChild, kind) while (1) { if (pWin->valdata && pWin->viewable) - REGION_APPEND( pScreen, &childUnion, + RegionAppend(&childUnion, &pWin->borderSize); if (pWin == pChild) break; pWin = pWin->prevSib; } } - REGION_VALIDATE(pScreen, &childUnion, &overlap); + RegionValidate(&childUnion, &overlap); if (overlap) - REGION_UNINIT(pScreen, &childUnion); + RegionUninit(&childUnion); } } @@ -756,13 +756,13 @@ miValidateTree (pParent, pChild, kind) { if (pWin->viewable) { if (pWin->valdata) { - REGION_INTERSECT( pScreen, &childClip, + RegionIntersect(&childClip, &totalClip, &pWin->borderSize); miComputeClips (pWin, pScreen, &childClip, kind, &exposed); if (overlap) { - REGION_SUBTRACT( pScreen, &totalClip, + RegionSubtract(&totalClip, &totalClip, &pWin->borderSize); } @@ -771,24 +771,24 @@ miValidateTree (pParent, pChild, kind) } } else { if (pWin->valdata) { - REGION_EMPTY( pScreen, &pWin->clipList); + RegionEmpty(&pWin->clipList); if (pScreen->ClipNotify) (* pScreen->ClipNotify) (pWin, 0, 0); - REGION_EMPTY( pScreen, &pWin->borderClip); + RegionEmpty(&pWin->borderClip); pWin->valdata = (ValidatePtr)NULL; } } } - REGION_UNINIT( pScreen, &childClip); + RegionUninit(&childClip); if (!overlap) { - REGION_SUBTRACT(pScreen, &totalClip, &totalClip, &childUnion); - REGION_UNINIT(pScreen, &childUnion); + RegionSubtract(&totalClip, &totalClip, &childUnion); + RegionUninit(&childUnion); } - REGION_NULL(pScreen, &pParent->valdata->after.exposed); - REGION_NULL(pScreen, &pParent->valdata->after.borderExposed); + RegionNull(&pParent->valdata->after.exposed); + RegionNull(&pParent->valdata->after.borderExposed); /* * each case below is responsible for updating the @@ -804,22 +804,22 @@ miValidateTree (pParent, pChild, kind) * exposures and obscures as per miComputeClips and reset the parent's * clipList. */ - REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed, + RegionSubtract(&pParent->valdata->after.exposed, &totalClip, &pParent->clipList); /* fall through */ case VTMap: if (pParent->backStorage) { - REGION_SUBTRACT( pScreen, &exposed, &pParent->clipList, &totalClip); + RegionSubtract(&exposed, &pParent->clipList, &totalClip); (* pScreen->SaveDoomedAreas)(pParent, &exposed, 0, 0); } - REGION_COPY( pScreen, &pParent->clipList, &totalClip); + RegionCopy(&pParent->clipList, &totalClip); pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; break; } - REGION_UNINIT( pScreen, &totalClip); - REGION_UNINIT( pScreen, &exposed); + RegionUninit(&totalClip); + RegionUninit(&exposed); if (pScreen->ClipNotify) (*pScreen->ClipNotify) (pParent, 0, 0); return (1); |