[xserver-commit] xserver/dix dispatch.c,3.33,3.34 events.c,3.51,3.52 window.c,3.40,3.41

Warren Turkal xserver-commit@pdx.freedesktop.org


Committed by: wt

Update of /cvs/xserver/xserver/dix
In directory pdx:/tmp/cvs-serv27606/dix

Modified Files:
	dispatch.c events.c window.c 
Log Message:
Make the shape extension always build


Index: dispatch.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/dispatch.c,v
retrieving revision 3.33
retrieving revision 3.34
diff -u -d -r3.33 -r3.34
--- dispatch.c	15 Jan 2004 08:56:18 -0000	3.33
+++ dispatch.c	12 Feb 2004 18:58:49 -0000	3.34
@@ -1265,9 +1265,7 @@
 	pWin = pDst->firstChild;
 	while (pWin)
 	{
-#ifdef SHAPE
 	    BoxRec  box;
-#endif
 	    if ((pWin->mapped) &&
 		(x >= pWin->drawable.x - wBorderWidth (pWin)) &&
 		(x < pWin->drawable.x + (int)pWin->drawable.width +
@@ -1275,7 +1273,6 @@
 		(y >= pWin->drawable.y - wBorderWidth (pWin)) &&
 		(y < pWin->drawable.y + (int)pWin->drawable.height +
 		 wBorderWidth (pWin))
-#ifdef SHAPE
 		/* When a window is shaped, a further check
 		 * is made to see if the point is inside
 		 * borderSize
@@ -1283,7 +1280,6 @@
 		&& (!wBoundingShape(pWin) ||
 		    POINT_IN_REGION(pWin->drawable.pScreen, 
 					&pWin->borderSize, x, y, &box))
-#endif
 		)
             {
 		rep.child = pWin->drawable.id;

Index: events.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/events.c,v
retrieving revision 3.51
retrieving revision 3.52
diff -u -d -r3.51 -r3.52
--- events.c	12 Feb 2004 18:37:11 -0000	3.51
+++ events.c	12 Feb 2004 18:58:49 -0000	3.52
@@ -186,9 +186,7 @@
     CursorPtr	current;
     BoxRec	hotLimits;	/* logical constraints of hot spot */
     Bool	confined;	/* confined to screen */
-#if defined(SHAPE) || defined(PANORAMIX)
     RegionPtr	hotShape;	/* additional logical shape constraint */
-#endif
     BoxRec	physLimits;	/* physical constraints of hot spot */
     WindowPtr	win;		/* window of logical position */
     HotSpot	hot;		/* logical pointer position */
@@ -631,7 +629,6 @@
     (*inputInfo.pointer->public.processInputProc)(&xE, inputInfo.pointer, 1);
 }
 
-#ifdef SHAPE
 static void
 ConfineToShape(RegionPtr shape, int *px, int *py)
 {
@@ -667,7 +664,6 @@
     *px = x;
     *py = y;
 }
-#endif
 
 static void
 CheckPhysLimits(
@@ -699,10 +695,8 @@
     else
 	if (new.y >= sprite.physLimits.y2)
 	    new.y = sprite.physLimits.y2 - 1;
-#ifdef SHAPE
     if (sprite.hotShape)
 	ConfineToShape(sprite.hotShape, &new.x, &new.y); 
-#endif
     if ((pScreen != sprite.hotPhys.pScreen) ||
 	(new.x != sprite.hotPhys.x) || (new.y != sprite.hotPhys.y))
     {
@@ -751,10 +745,8 @@
 	    sprite.hot.y = lims.y1;
 	else if (sprite.hot.y >= lims.y2)
 	    sprite.hot.y = lims.y2 - 1;
-#ifdef SHAPE
 	if (wBoundingShape(pWin))
 	    ConfineToShape(&pWin->borderSize, &sprite.hot.x, &sprite.hot.y);
-#endif
 	if (qe)
 	{
 	    qe->pScreen = sprite.hot.pScreen;
@@ -785,10 +777,8 @@
     else
     {
 	sprite.hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize);
-#ifdef SHAPE
 	sprite.hotShape = wBoundingShape(pWin) ? &pWin->borderSize
 					       : NullRegion;
-#endif
 	CheckPhysLimits(sprite.current, generateEvents, confineToScreen,
 			pScreen);
     }
@@ -1930,13 +1920,11 @@
 		(y >= pWin->drawable.y - wBorderWidth (pWin)) &&
 		(y < pWin->drawable.y + (int)pWin->drawable.height +
 		    wBorderWidth (pWin))
-#ifdef SHAPE
 		/* When a window is shaped, a further check
 		 * is made to see if the point is inside
 		 * borderSize
 		 */
 		&& (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
-#endif
 		)
 	{
 	    if (spriteTraceGood >= spriteTraceSize)
@@ -1983,10 +1971,8 @@
 	    sprite.hot.y = sprite.physLimits.y1;
 	else if (sprite.hot.y >= sprite.physLimits.y2)
 	    sprite.hot.y = sprite.physLimits.y2 - 1;
-#ifdef SHAPE
 	if (sprite.hotShape)
 	    ConfineToShape(sprite.hotShape, &sprite.hot.x, &sprite.hot.y);
-#endif
 	sprite.hotPhys = sprite.hot;
 	if ((sprite.hotPhys.x != XE_KBPTR.rootX) ||
 	    (sprite.hotPhys.y != XE_KBPTR.rootY))
@@ -2058,9 +2044,7 @@
 	sprite.hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y;
 	sprite.physLimits = sprite.hotLimits;
 	sprite.confineWin = NullWindow;
-#ifdef SHAPE
         sprite.hotShape = NullRegion;
-#endif
 	sprite.screen = pScreen;
 	/* gotta UNINIT these someplace */
 	REGION_INIT(pScreen, &sprite.Reg1, NullBox, 1);
@@ -2306,10 +2290,8 @@
 	    y = sprite.physLimits.y1;
 	else if (y >= sprite.physLimits.y2)
 	    y = sprite.physLimits.y2 - 1;
-#if defined(SHAPE)
 	if (sprite.hotShape)
 	    ConfineToShape(sprite.hotShape, &x, &y);
-#endif
 	(*newScreen->SetCursorPosition)(newScreen, x, y, TRUE);
     }
     else if (!PointerConfinedToScreen())

Index: window.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/window.c,v
retrieving revision 3.40
retrieving revision 3.41
diff -u -d -r3.40 -r3.41
--- window.c	12 Feb 2004 18:37:11 -0000	3.40
+++ window.c	12 Feb 2004 18:58:49 -0000	3.41
@@ -426,10 +426,8 @@
     pWin->optional->userProps = NULL;
     pWin->optional->backingBitPlanes = ~0L;
     pWin->optional->backingPixel = 0;
-#ifdef SHAPE
     pWin->optional->boundingShape = NULL;
     pWin->optional->clipShape = NULL;
-#endif
 #ifdef XINPUT
     pWin->optional->inputMasks = NULL;
 #endif
@@ -825,12 +823,10 @@
     REGION_UNINIT(pScreen, &pWin->winSize);
     REGION_UNINIT(pScreen, &pWin->borderClip);
     REGION_UNINIT(pScreen, &pWin->borderSize);
-#ifdef SHAPE
     if (wBoundingShape (pWin))
 	REGION_DESTROY(pScreen, wBoundingShape (pWin));
     if (wClipShape (pWin))
 	REGION_DESTROY(pScreen, wClipShape (pWin));
-#endif
     if (pWin->borderIsPixel == FALSE)
 	(*pScreen->DestroyPixmap)(pWin->border.pixmap);
     if (pWin->backgroundState == BackgroundPixmap)
@@ -1636,7 +1632,6 @@
     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);
-#ifdef SHAPE
     if (wBoundingShape (pWin) || wClipShape (pWin)) {
 	REGION_PTR(pScreen, pWin)
 
@@ -1648,7 +1643,6 @@
 	    REGION_INTERSECT(pScreen, pRgn, pRgn, wClipShape (pWin));
 	REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x, pWin->drawable.y);
     }
-#endif
     return pRgn;
 }
 
@@ -1672,7 +1666,6 @@
 			 pWin->drawable.x, pWin->drawable.y,
 			 (int)pWin->drawable.width,
 			 (int)pWin->drawable.height);
-#ifdef SHAPE
     if (wBoundingShape (pWin) || wClipShape (pWin)) {
 	REGION_PTR(pScreen, pWin)
 
@@ -1687,7 +1680,6 @@
 	REGION_TRANSLATE(pScreen, &pWin->winSize, pWin->drawable.x,
 			 pWin->drawable.y);
     }
-#endif
 }
 
 void
@@ -1714,7 +1706,6 @@
 		pWin->drawable.x - bw, pWin->drawable.y - bw,
 		(int)(pWin->drawable.width + (bw<<1)),
 		(int)(pWin->drawable.height + (bw<<1)));
-#ifdef SHAPE
 	if (wBoundingShape (pWin)) {
 	    REGION_PTR(pScreen, pWin)
 
@@ -1727,7 +1718,6 @@
 	    REGION_UNION(pScreen, &pWin->borderSize, &pWin->borderSize,
 			 &pWin->winSize);
 	}
-#endif
     } else {
 	REGION_COPY(pWin->drawable.pScreen, &pWin->borderSize,
 					       &pWin->winSize);
@@ -1916,7 +1906,6 @@
     return(pBox);
 }
 
-#ifdef SHAPE
 #define IS_SHAPED(pWin)	(wBoundingShape (pWin) != (RegionPtr) NULL)
 
 static RegionPtr
@@ -1960,7 +1949,6 @@
     REGION_DESTROY(pScreen, pSibRgn);
     return ret;
 }
-#endif
 
 static Bool
 AnyWindowOverlapsMe(
@@ -1978,9 +1966,7 @@
 	{
 	    sbox = WindowExtents(pSib, &sboxrec);
 	    if (BOXES_OVERLAP(sbox, box)
-#ifdef SHAPE
 	    && ShapeOverlap (pWin, box, pSib, sbox)
-#endif
 	    )
 		return(TRUE);
 	}
@@ -2003,9 +1989,7 @@
 	{
 	    sbox = WindowExtents(pSib, &sboxrec);
 	    if (BOXES_OVERLAP(sbox, box)
-#ifdef SHAPE
 	    && ShapeOverlap (pWin, box, pSib, sbox)
-#endif
 	    )
 		return(TRUE);
 	}
@@ -3629,12 +3613,10 @@
 	return;
     if (optional->backingPixel != 0)
 	return;
-#ifdef SHAPE
     if (optional->boundingShape != NULL)
 	return;
     if (optional->clipShape != NULL)
 	return;
-#endif
 #ifdef XINPUT
     if (optional->inputMasks != NULL)
 	return;
@@ -3677,10 +3659,8 @@
     optional->userProps = NULL;
     optional->backingBitPlanes = ~0L;
     optional->backingPixel = 0;
-#ifdef SHAPE
     optional->boundingShape = NULL;
     optional->clipShape = NULL;
-#endif
 #ifdef XINPUT
     optional->inputMasks = NULL;
 #endif