diff options
Diffstat (limited to 'mi')
-rw-r--r-- | mi/miarc.c | 5 | ||||
-rw-r--r-- | mi/mibank.c | 10 | ||||
-rw-r--r-- | mi/mibstore.c | 10 | ||||
-rw-r--r-- | mi/micoord.h | 6 | ||||
-rw-r--r-- | mi/midash.c | 4 | ||||
-rw-r--r-- | mi/midispcur.c | 31 | ||||
-rw-r--r-- | mi/miexpose.c | 6 | ||||
-rw-r--r-- | mi/mifillarc.c | 4 | ||||
-rw-r--r-- | mi/mioverlay.c | 37 | ||||
-rw-r--r-- | mi/mipoly.c | 3 | ||||
-rw-r--r-- | mi/mipolyrect.c | 4 | ||||
-rw-r--r-- | mi/mipolyseg.c | 4 | ||||
-rw-r--r-- | mi/mipolyutil.c | 4 | ||||
-rw-r--r-- | mi/mipushpxl.c | 4 | ||||
-rw-r--r-- | mi/miregion.c | 16 | ||||
-rw-r--r-- | mi/miscrinit.c | 3 | ||||
-rw-r--r-- | mi/mistruct.h | 4 | ||||
-rw-r--r-- | mi/mivalidate.h | 2 | ||||
-rw-r--r-- | mi/mivaltree.c | 30 | ||||
-rw-r--r-- | mi/miwideline.c | 4 | ||||
-rw-r--r-- | mi/miwindow.c | 10 | ||||
-rw-r--r-- | mi/mizerarc.c | 4 |
22 files changed, 113 insertions, 92 deletions
diff --git a/mi/miarc.c b/mi/miarc.c index 8c86200ee..832a056c3 100644 --- a/mi/miarc.c +++ b/mi/miarc.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/miarc.c,v 3.13 2002/01/12 22:20:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/miarc.c,v 3.14 2003/10/29 22:57:48 tsi Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -1656,7 +1656,6 @@ miGetArcPts( xc, yc; /* the center point */ int count, i; SppPointPtr poly; - DDXPointRec last; /* last point on integer boundaries */ /* The spec says that positive angles indicate counterclockwise motion. * Given our coordinate system (with 0,0 in the upper left corner), @@ -1703,8 +1702,6 @@ miGetArcPts( poly[cpt].x = (xc + x0); poly[cpt].y = (yc + y0); - last.x = ROUNDTOINT( poly[cpt + 1].x = (xc + x1) ); - last.y = ROUNDTOINT( poly[cpt + 1].y = (yc + y1) ); for(i = 2; i < count; i++) { diff --git a/mi/mibank.c b/mi/mibank.c index a6e1942c2..cc2796edb 100644 --- a/mi/mibank.c +++ b/mi/mibank.c @@ -44,7 +44,7 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/mi/mibank.c,v 1.13 2003/01/01 19:16:42 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/mibank.c,v 1.15 2003/11/10 18:39:16 tsi Exp $ */ /* * This thing originated from an idea of Edwin Goei and his bank switching @@ -300,7 +300,7 @@ static unsigned long miBankGeneration = 0; #define GCOP_0D_ARGS mode, #define GCOP_1D_ARGS -#define GCOP_2D_ARGS shape, mode, +#define GCOP_2D_ARGS shape, mode, #define GCOP_COMPLEX(aop, atype) \ if (nArray > 0) \ @@ -1911,7 +1911,7 @@ miBankPaintWindow( } else { - REGION_INIT(pScreen, &tmpReg, NullBox, 0); + REGION_NULL(pScreen, &tmpReg); for (i = 0; i < pScreenPriv->nBanks; i++) { @@ -2082,7 +2082,7 @@ miBankSaveAreas( } else { - REGION_INIT(pScreen, &rgnClipped, NullBox, 0); + REGION_NULL(pScreen, &rgnClipped); REGION_TRANSLATE(pScreen, prgnSave, xorg, yorg); for (i = 0; i < pScreenPriv->nBanks; i++) @@ -2136,7 +2136,7 @@ miBankRestoreAreas( } else { - REGION_INIT(pScreen, &rgnClipped, NullBox, 0); + REGION_NULL(pScreen, &rgnClipped); for (i = 0; i < pScreenPriv->nBanks; i++) { diff --git a/mi/mibstore.c b/mi/mibstore.c index f98aaebbf..e04e5410c 100644 --- a/mi/mibstore.c +++ b/mi/mibstore.c @@ -42,7 +42,7 @@ implied warranty. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/mi/mibstore.c,v 1.10 2001/12/14 20:00:20 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/mibstore.c,v 1.11 2003/11/10 18:22:47 tsi Exp $ */ #define NEED_EVENTS #include "X.h" @@ -504,8 +504,8 @@ miBSGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) } ChangeGC (pGC, GCSubwindowMode, &subWindowMode); ValidateGC ((DrawablePtr)pPixmap, pGC); - REGION_INIT(pScreen, &Border, NullBox, 0); - REGION_INIT(pScreen, &Inside, NullBox, 0); + REGION_NULL(pScreen, &Border); + REGION_NULL(pScreen, &Inside); pSrcWin = (WindowPtr) pDrawable; x = sx; y = sy; @@ -2584,7 +2584,7 @@ miBSAllocate(pWin) pBackingStore->pBackingPixmap = NullPixmap; pBackingStore->x = 0; pBackingStore->y = 0; - REGION_INIT( pScreen, &pBackingStore->SavedRegion, NullBox, 1); + REGION_NULL( pScreen, &pBackingStore->SavedRegion); pBackingStore->viewable = (char)pWin->viewable; pBackingStore->status = StatusNoPixmap; pBackingStore->backgroundState = None; @@ -3850,7 +3850,7 @@ miBSExposeCopy (pSrc, pDst, pGC, prgnExposed, srcx, srcy, dstx, dsty, plane) (pBackingStore->status == StatusBadAlloc)) return; - REGION_INIT( pGC->pScreen, &tempRgn, NullBox, 0); + REGION_NULL( pGC->pScreen, &tempRgn); REGION_INTERSECT( pGC->pScreen, &tempRgn, prgnExposed, &pBackingStore->SavedRegion); REGION_SUBTRACT( pGC->pScreen, prgnExposed, prgnExposed, &tempRgn); diff --git a/mi/micoord.h b/mi/micoord.h index f31c88c83..ffe2e1e53 100644 --- a/mi/micoord.h +++ b/mi/micoord.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/micoord.h,v 1.5 2002/05/22 21:38:31 herrb Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/micoord.h,v 1.7 2003/10/29 22:57:48 tsi Exp $ */ /* * Copyright (C) 2000 The XFree86 Project, Inc. All Rights Reserved. * @@ -44,13 +44,13 @@ * forcing as to use div instead of shift. Let's be explicit. */ -#if defined(mips) || \ +#if defined(mips) || defined(sgi) || \ defined(sparc) || defined(__sparc64__) || \ defined(__alpha) || defined(__alpha__) || \ defined(__i386__) || defined(i386) || \ defined(__ia64__) || defined(ia64) || \ defined(__s390x__) || defined(__s390__) || \ - defined(__x86_64__) || defined(x86_64) + defined(__AMD64__) || defined(AMD64) #define GetHighWord(x) (((int) (x)) >> 16) #else #define GetHighWord(x) (((int) (x)) / 65536) diff --git a/mi/midash.c b/mi/midash.c index c3dd24355..bc33b0c20 100644 --- a/mi/midash.c +++ b/mi/midash.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/midash.c,v 1.4 2001/12/14 20:00:21 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/midash.c,v 1.5 2003/07/16 01:38:56 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -46,7 +46,7 @@ SOFTWARE. ******************************************************************/ /* $Xorg: midash.c,v 1.4 2001/02/09 02:05:20 xorgcvs Exp $ */ -#include "miscstruct.h" +#include "regionstr.h" #include "mistruct.h" #include "mifpoly.h" diff --git a/mi/midispcur.c b/mi/midispcur.c index 3917a7928..ca85fc3d1 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -30,7 +30,7 @@ Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/mi/midispcur.c,v 1.9 2002/12/09 04:10:57 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/midispcur.c,v 1.10 2003/03/06 05:52:58 mvojkovi Exp $ */ #define NEED_EVENTS # include "X.h" @@ -379,14 +379,15 @@ miDCPutBits ( miDCCursorPtr pPriv, GCPtr sourceGC, GCPtr maskGC, - int x, - int y, + int x_org, + int y_org, unsigned w, unsigned h, unsigned long source, unsigned long mask) { XID gcvals[1]; + int x, y; if (sourceGC->fgPixel != source) { @@ -395,6 +396,18 @@ miDCPutBits ( } if (sourceGC->serialNumber != pDrawable->serialNumber) ValidateGC (pDrawable, sourceGC); + + if(sourceGC->miTranslate) + { + x = pDrawable->x + x_org; + y = pDrawable->y + y_org; + } + else + { + x = x_org; + y = y_org; + } + (*sourceGC->ops->PushPixels) (sourceGC, pPriv->sourceBits, pDrawable, w, h, x, y); if (maskGC->fgPixel != mask) { @@ -403,6 +416,18 @@ miDCPutBits ( } if (maskGC->serialNumber != pDrawable->serialNumber) ValidateGC (pDrawable, maskGC); + + if(maskGC->miTranslate) + { + x = pDrawable->x + x_org; + y = pDrawable->y + y_org; + } + else + { + x = x_org; + y = y_org; + } + (*maskGC->ops->PushPixels) (maskGC, pPriv->maskBits, pDrawable, w, h, x, y); } diff --git a/mi/miexpose.c b/mi/miexpose.c index ca896b9e0..07efa754c 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/miexpose.c,v 3.9 2001/12/14 20:00:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/miexpose.c,v 3.10 2003/11/10 18:22:49 tsi Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -164,7 +164,7 @@ miHandleExposures(pSrcDrawable, pDstDrawable, if ((RECT_IN_REGION(pscr, &pSrcWin->clipList, &TsrcBox)) == rgnIN) return NULL; prgnSrcClip = &rgnSrcRec; - REGION_INIT(pscr, prgnSrcClip, NullBox, 0); + REGION_NULL(pscr, prgnSrcClip); REGION_COPY(pscr, prgnSrcClip, &pSrcWin->clipList); } REGION_TRANSLATE(pscr, prgnSrcClip, @@ -201,7 +201,7 @@ miHandleExposures(pSrcDrawable, pDstDrawable, else { prgnDstClip = &rgnDstRec; - REGION_INIT(pscr, prgnDstClip, NullBox, 0); + REGION_NULL(pscr, prgnDstClip); REGION_COPY(pscr, prgnDstClip, &((WindowPtr)pDstDrawable)->clipList); } diff --git a/mi/mifillarc.c b/mi/mifillarc.c index a93b9e3a2..fa37d45be 100644 --- a/mi/mifillarc.c +++ b/mi/mifillarc.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/mifillarc.c,v 3.7 2001/12/14 20:00:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/mifillarc.c,v 3.8 2003/07/16 01:38:56 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -32,7 +32,7 @@ Author: Bob Scheifler, MIT X Consortium #include <math.h> #include "X.h" #include "Xprotostr.h" -#include "miscstruct.h" +#include "regionstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "mifpoly.h" diff --git a/mi/mioverlay.c b/mi/mioverlay.c index 9e765b206..cdb2058b1 100644 --- a/mi/mioverlay.c +++ b/mi/mioverlay.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/mioverlay.c,v 3.14 2002/10/18 00:07:13 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/mioverlay.c,v 3.16 2003/11/10 18:22:49 tsi Exp $ */ #include "X.h" #include "scrnintstr.h" @@ -208,8 +208,8 @@ miOverlayCreateWindow(WindowPtr pWin) pTree->visibility = VisibilityNotViewable; pWinPriv->tree = pTree; if(pWin->parent) { - REGION_INIT(pScreen, &(pTree->borderClip), NullBox, 1); - REGION_INIT(pScreen, &(pTree->clipList), NullBox, 1); + REGION_NULL(pScreen, &(pTree->borderClip)); + REGION_NULL(pScreen, &(pTree->clipList)); RebuildTree(pWin); } else { BoxRec fullBox; @@ -539,16 +539,14 @@ miOverlayComputeClips( (* pScreen->ClipNotify) (tChild->pWin, dx, dy); } if (tChild->valdata) { - REGION_INIT(pScreen, &tChild->valdata->borderExposed, - NullBox, 0); + REGION_NULL(pScreen, &tChild->valdata->borderExposed); if (HasParentRelativeBorder(tChild->pWin)){ REGION_SUBTRACT(pScreen, &tChild->valdata->borderExposed, &tChild->borderClip, &tChild->pWin->winSize); } - REGION_INIT( pScreen, &tChild->valdata->exposed, - NullBox, 0); + REGION_NULL(pScreen, &tChild->valdata->exposed); } if (tChild->firstChild) { tChild = tChild->firstChild; @@ -577,8 +575,8 @@ miOverlayComputeClips( } borderVisible = tParent->valdata->borderVisible; - REGION_INIT( pScreen, &tParent->valdata->borderExposed, NullBox, 0); - REGION_INIT( pScreen, &tParent->valdata->exposed, NullBox, 0); + REGION_NULL(pScreen, &tParent->valdata->borderExposed); + REGION_NULL(pScreen, &tParent->valdata->exposed); if (HasBorder (pParent)) { if (borderVisible) { @@ -601,8 +599,8 @@ miOverlayComputeClips( REGION_COPY( pScreen, &tParent->borderClip, universe); if ((tChild = tParent->firstChild) && pParent->mapped) { - REGION_INIT(pScreen, &childUniverse, NullBox, 0); - REGION_INIT(pScreen, &childUnion, NullBox, 0); + REGION_NULL(pScreen, &childUniverse); + REGION_NULL(pScreen, &childUnion); for (; tChild; tChild = tChild->nextSib) { if (tChild->pWin->viewable) @@ -751,9 +749,9 @@ miOverlayValidateTree( if (!pChild) pChild = pParent->firstChild; - REGION_INIT(pScreen, &totalClip, NullBox, 0); - REGION_INIT(pScreen, &childClip, NullBox, 0); - REGION_INIT(pScreen, &exposed, NullBox, 0); + REGION_NULL(pScreen, &totalClip); + REGION_NULL(pScreen, &childClip); + REGION_NULL(pScreen, &exposed); newParent = pParent; @@ -811,8 +809,8 @@ miOverlayValidateTree( REGION_UNINIT(pScreen, &childClip); if(!((*pPriv->InOverlay)(newParent))) { - REGION_INIT(pScreen, &tParent->valdata->exposed, NullBox, 0); - REGION_INIT(pScreen, &tParent->valdata->borderExposed, NullBox, 0); + REGION_NULL(pScreen, &tParent->valdata->exposed); + REGION_NULL(pScreen, &tParent->valdata->borderExposed); } switch (kind) { @@ -953,8 +951,8 @@ miOverlayMoveWindow( oldpt.x = pWin->drawable.x; oldpt.y = pWin->drawable.y; if (WasViewable) { - REGION_INIT(pScreen, &overReg, NullBox, 1); - REGION_INIT(pScreen, &underReg, NullBox, 0); + REGION_NULL(pScreen, &overReg); + REGION_NULL(pScreen, &underReg); if(pTree) { REGION_COPY(pScreen, &overReg, &pWin->borderClip); REGION_COPY(pScreen, &underReg, &pTree->borderClip); @@ -1667,7 +1665,6 @@ miOverlayChangeBorderWidth( WindowPtr pWin, unsigned int width ){ - WindowPtr pParent; int oldwidth; register ScreenPtr pScreen; Bool WasViewable = (Bool)(pWin->viewable); @@ -1681,7 +1678,6 @@ miOverlayChangeBorderWidth( return; HadBorder = HasBorder(pWin); pScreen = pWin->drawable.pScreen; - pParent = pWin->parent; if (WasViewable && (width < oldwidth)) (*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL); @@ -2029,6 +2025,7 @@ HasUnderlayChildren(WindowPtr pWin) static Bool CollectUnderlayChildrenRegions(WindowPtr pWin, RegionPtr pReg) { + ScreenPtr pScreen = pWin->drawable.pScreen; WindowPtr pChild; miOverlayTreePtr pTree; Bool hasUnderlay; diff --git a/mi/mipoly.c b/mi/mipoly.c index b25ee780f..ad69d7062 100644 --- a/mi/mipoly.c +++ b/mi/mipoly.c @@ -1,3 +1,4 @@ +/* $XFree86: xc/programs/Xserver/mi/mipoly.c,v 1.3 2003/07/16 01:38:56 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -60,7 +61,7 @@ SOFTWARE. #include "gcstruct.h" #include "pixmapstr.h" #include "mi.h" -#include "miscstruct.h" +#include "regionstr.h" void diff --git a/mi/mipolyrect.c b/mi/mipolyrect.c index f6d170ef9..298ba2385 100644 --- a/mi/mipolyrect.c +++ b/mi/mipolyrect.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/mipolyrect.c,v 1.3 2001/12/14 20:00:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/mipolyrect.c,v 1.4 2003/07/16 01:38:57 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -48,7 +48,7 @@ SOFTWARE. /* $Xorg: mipolyrect.c,v 1.4 2001/02/09 02:05:21 xorgcvs Exp $ */ #include "X.h" #include "Xprotostr.h" -#include "miscstruct.h" +#include "regionstr.h" #include "gcstruct.h" #include "pixmap.h" #include "mi.h" diff --git a/mi/mipolyseg.c b/mi/mipolyseg.c index 82f2983e3..cb6bb7550 100644 --- a/mi/mipolyseg.c +++ b/mi/mipolyseg.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/mipolyseg.c,v 1.3 2001/12/14 20:00:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/mipolyseg.c,v 1.4 2003/07/16 01:38:57 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -48,7 +48,7 @@ SOFTWARE. /* $Xorg: mipolyseg.c,v 1.4 2001/02/09 02:05:21 xorgcvs Exp $ */ #include "X.h" #include "Xprotostr.h" -#include "miscstruct.h" +#include "regionstr.h" #include "gcstruct.h" #include "pixmap.h" #include "mi.h" diff --git a/mi/mipolyutil.c b/mi/mipolyutil.c index 537ac6fb4..7ffeadd86 100644 --- a/mi/mipolyutil.c +++ b/mi/mipolyutil.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/mipolyutil.c,v 1.9 2001/12/14 20:00:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/mipolyutil.c,v 1.10 2003/07/16 01:38:57 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -46,7 +46,7 @@ SOFTWARE. ******************************************************************/ /* $Xorg: mipolyutil.c,v 1.4 2001/02/09 02:05:21 xorgcvs Exp $ */ -#include "miscstruct.h" +#include "regionstr.h" #include "gc.h" #include "miscanfill.h" #include "mipoly.h" diff --git a/mi/mipushpxl.c b/mi/mipushpxl.c index 462d93191..0c8d32ae6 100644 --- a/mi/mipushpxl.c +++ b/mi/mipushpxl.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/mipushpxl.c,v 3.12 2001/12/14 20:00:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/mipushpxl.c,v 3.13 2003/07/16 01:38:57 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -50,7 +50,7 @@ SOFTWARE. #include "gcstruct.h" #include "scrnintstr.h" #include "pixmapstr.h" -#include "miscstruct.h" +#include "regionstr.h" #include "../mfb/maskbits.h" #include "mi.h" diff --git a/mi/miregion.c b/mi/miregion.c index 9a40e7757..ef666c321 100644 --- a/mi/miregion.c +++ b/mi/miregion.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/miregion.c,v 1.8 2001/12/14 20:00:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/miregion.c,v 1.10 2003/07/16 01:38:57 dawes Exp $ */ /*********************************************************** Copyright 1987, 1988, 1989, 1998 The Open Group @@ -70,7 +70,6 @@ SOFTWARE. * * *****************************************************************/ -#include "miscstruct.h" #include "regionstr.h" #include "Xprotostr.h" #include "gc.h" @@ -236,25 +235,27 @@ miPrintRegion(rgn) ErrorF("\n"); return(num); } - +#endif /* DEBUG */ Bool -miRegionsEqual(reg1, reg2) +miRegionEqual(reg1, reg2) RegionPtr reg1; RegionPtr reg2; { - int i; + int i, num; BoxPtr rects1, rects2; if (reg1->extents.x1 != reg2->extents.x1) return FALSE; if (reg1->extents.x2 != reg2->extents.x2) return FALSE; if (reg1->extents.y1 != reg2->extents.y1) return FALSE; if (reg1->extents.y2 != reg2->extents.y2) return FALSE; - if (REGION_NUM_RECTS(reg1) != REGION_NUM_RECTS(reg2)) return FALSE; + + num = REGION_NUM_RECTS(reg1); + if (num != REGION_NUM_RECTS(reg2)) return FALSE; rects1 = REGION_RECTS(reg1); rects2 = REGION_RECTS(reg2); - for (i = 0; i != REGION_NUM_RECTS(reg1); i++) { + for (i = 0; i != num; i++) { if (rects1[i].x1 != rects2[i].x1) return FALSE; if (rects1[i].x2 != rects2[i].x2) return FALSE; if (rects1[i].y1 != rects2[i].y1) return FALSE; @@ -263,6 +264,7 @@ miRegionsEqual(reg1, reg2) return TRUE; } +#ifdef DEBUG Bool miValidRegion(reg) RegionPtr reg; diff --git a/mi/miscrinit.c b/mi/miscrinit.c index ee199d24d..edb5f7d78 100644 --- a/mi/miscrinit.c +++ b/mi/miscrinit.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/mi/miscrinit.c,v 3.15 2001/12/14 20:00:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/miscrinit.c,v 3.16 2003/04/23 21:51:53 tsi Exp $ */ #include "X.h" #include "servermd.h" @@ -277,6 +277,7 @@ miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, pScreen->RectIn = miRectIn; pScreen->PointInRegion = miPointInRegion; pScreen->RegionNotEmpty = miRegionNotEmpty; + pScreen->RegionEqual = miRegionEqual; pScreen->RegionBroken = miRegionBroken; pScreen->RegionBreak = miRegionBreak; pScreen->RegionEmpty = miRegionEmpty; diff --git a/mi/mistruct.h b/mi/mistruct.h index 28994fec5..0744b2593 100644 --- a/mi/mistruct.h +++ b/mi/mistruct.h @@ -45,11 +45,13 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ +/* $XFree86: xc/programs/Xserver/mi/mistruct.h,v 1.3 2003/07/16 01:38:57 dawes Exp $ */ + #ifndef MISTRUCT_H #define MISTRUCT_H #include "mi.h" -#include "miscstruct.h" +#include "regionstr.h" /* information about dashes */ typedef struct _miDash { diff --git a/mi/mivalidate.h b/mi/mivalidate.h index cca4a1b7c..c1ef15bb1 100644 --- a/mi/mivalidate.h +++ b/mi/mivalidate.h @@ -26,12 +26,12 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/programs/Xserver/mi/mivalidate.h,v 1.3 2003/07/16 01:38:57 dawes Exp $ */ #ifndef MIVALIDATE_H #define MIVALIDATE_H -#include "miscstruct.h" #include "regionstr.h" typedef union _Validate { diff --git a/mi/mivaltree.c b/mi/mivaltree.c index eb1e01e60..90ba5d98e 100644 --- a/mi/mivaltree.c +++ b/mi/mivaltree.c @@ -73,7 +73,7 @@ in this Software without prior written authorization from The Open Group. * * *****************************************************************/ -/* $XFree86: xc/programs/Xserver/mi/mivaltree.c,v 1.9 2001/12/14 20:00:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/mivaltree.c,v 1.10 2003/11/10 18:22:49 tsi Exp $ */ /* * Aug '86: Susan Angebranndt -- original code @@ -291,9 +291,8 @@ miComputeClips ( } if (pChild->valdata) { - REGION_INIT(pScreen, - &pChild->valdata->after.borderExposed, - NullBox, 0); + REGION_NULL(pScreen, + &pChild->valdata->after.borderExposed); if (HasParentRelativeBorder(pChild)) { REGION_SUBTRACT(pScreen, @@ -301,8 +300,7 @@ miComputeClips ( &pChild->borderClip, &pChild->winSize); } - REGION_INIT( pScreen, &pChild->valdata->after.exposed, - NullBox, 0); + REGION_NULL(pScreen, &pChild->valdata->after.exposed); } if (pChild->firstChild) { @@ -343,8 +341,8 @@ miComputeClips ( borderVisible = pParent->valdata->before.borderVisible; resized = pParent->valdata->before.resized; - REGION_INIT( pScreen, &pParent->valdata->after.borderExposed, NullBox, 0); - REGION_INIT( pScreen, &pParent->valdata->after.exposed, NullBox, 0); + REGION_NULL(pScreen, &pParent->valdata->after.borderExposed); + REGION_NULL(pScreen, &pParent->valdata->after.exposed); /* * Since the borderClip must not be clipped by the children, we do @@ -394,8 +392,8 @@ miComputeClips ( if ((pChild = pParent->firstChild) && pParent->mapped) { - REGION_INIT(pScreen, &childUniverse, NullBox, 0); - REGION_INIT(pScreen, &childUnion, NullBox, 0); + REGION_NULL(pScreen, &childUniverse); + REGION_NULL(pScreen, &childUnion); if ((pChild->drawable.y < pParent->lastChild->drawable.y) || ((pChild->drawable.y == pParent->lastChild->drawable.y) && (pChild->drawable.x < pParent->lastChild->drawable.x))) @@ -589,8 +587,8 @@ miValidateTree (pParent, pChild, kind) if (pChild == NullWindow) pChild = pParent->firstChild; - REGION_INIT(pScreen, &childClip, NullBox, 0); - REGION_INIT(pScreen, &exposed, NullBox, 0); + REGION_NULL(pScreen, &childClip); + REGION_NULL(pScreen, &exposed); /* * compute the area of the parent window occupied @@ -598,7 +596,7 @@ miValidateTree (pParent, pChild, kind) * is the area which can be divied up among the marked * children in their new configuration. */ - REGION_INIT(pScreen, &totalClip, NullBox, 0); + REGION_NULL(pScreen, &totalClip); viewvals = 0; if (REGION_BROKEN (pScreen, &pParent->clipList) && !REGION_BROKEN (pScreen, &pParent->borderClip)) @@ -680,7 +678,7 @@ miValidateTree (pParent, pChild, kind) * lower than the cost of multiple Subtracts in the * loop below. */ - REGION_INIT(pScreen, &childUnion, NullBox, 0); + REGION_NULL(pScreen, &childUnion); if (forward) { for (pWin = pChild; pWin; pWin = pWin->nextSib) @@ -744,8 +742,8 @@ miValidateTree (pParent, pChild, kind) REGION_UNINIT(pScreen, &childUnion); } - REGION_INIT( pScreen, &pParent->valdata->after.exposed, NullBox, 0); - REGION_INIT( pScreen, &pParent->valdata->after.borderExposed, NullBox, 0); + REGION_NULL(pScreen, &pParent->valdata->after.exposed); + REGION_NULL(pScreen, &pParent->valdata->after.borderExposed); /* * each case below is responsible for updating the diff --git a/mi/miwideline.c b/mi/miwideline.c index 4eb365aca..84b4346f2 100644 --- a/mi/miwideline.c +++ b/mi/miwideline.c @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/mi/miwideline.c,v 1.12 2001/12/14 20:00:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/miwideline.c,v 1.13 2003/07/16 01:38:57 dawes Exp $ */ /* Author: Keith Packard, MIT X Consortium */ @@ -46,7 +46,7 @@ from The Open Group. #include "X.h" #include "windowstr.h" #include "gcstruct.h" -#include "miscstruct.h" +#include "regionstr.h" #include "miwideline.h" #include "mi.h" diff --git a/mi/miwindow.c b/mi/miwindow.c index fbced41c6..9c962ee4e 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/miwindow.c,v 1.7 2001/12/14 20:00:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/miwindow.c,v 1.10 2003/11/10 18:22:49 tsi Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -47,7 +47,7 @@ SOFTWARE. ******************************************************************/ /* $Xorg: miwindow.c,v 1.4 2001/02/09 02:05:22 xorgcvs Exp $ */ #include "X.h" -#include "miscstruct.h" +#include "regionstr.h" #include "region.h" #include "mi.h" #include "windowstr.h" @@ -196,7 +196,7 @@ miCheckSubSaveUnder( { if (!subInited) { - REGION_INIT(pScreen, &SubRegion, NullBox, 0); + REGION_NULL(pScreen, &SubRegion); subInited = TRUE; } REGION_COPY(pScreen, &SubRegion, pRegion); @@ -279,7 +279,7 @@ miChangeSaveUnder(pWin, first) numSaveUndersViewable += deltaSaveUndersViewable; deltaSaveUndersViewable = 0; pScreen = pWin->drawable.pScreen; - REGION_INIT(pScreen, &rgn, NullBox, 1); + REGION_NULL(pScreen, &rgn); res = miCheckSubSaveUnder (pWin->parent, pWin->saveUnder ? first : pWin->nextSib, &rgn); @@ -1076,7 +1076,6 @@ miChangeBorderWidth(pWin, width) register WindowPtr pWin; unsigned int width; { - WindowPtr pParent; int oldwidth; Bool anyMarked = FALSE; register ScreenPtr pScreen; @@ -1092,7 +1091,6 @@ miChangeBorderWidth(pWin, width) return; HadBorder = HasBorder(pWin); pScreen = pWin->drawable.pScreen; - pParent = pWin->parent; if (WasViewable && width < oldwidth) anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pWin, &pLayerWin); diff --git a/mi/mizerarc.c b/mi/mizerarc.c index 971e2cb03..e2233e78e 100644 --- a/mi/mizerarc.c +++ b/mi/mizerarc.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/mi/mizerarc.c,v 1.6 2001/12/14 20:00:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/mi/mizerarc.c,v 1.7 2003/07/16 01:38:59 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -38,7 +38,7 @@ Author: Bob Scheifler, MIT X Consortium #include <math.h> #include "X.h" #include "Xprotostr.h" -#include "miscstruct.h" +#include "regionstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "mi.h" |