[PATCH] 4/5 various cleanups

Warren Turkal wt@midsouth.rr.com
Thu, 12 Feb 2004 05:50:27 -0600


This is the first of 5 cleanup patches I have made. I don't think these
patches conflict, but it would be best to apply them in numerical order.

wt

This makes the shape extension always build.

diff -Nru3 xserver-old/Xext/panoramiXprocs.c xserver/Xext/panoramiXprocs.c
--- xserver-old/Xext/panoramiXprocs.c   2003-09-11 00:12:50.000000000 -0500
+++ xserver/Xext/panoramiXprocs.c       2004-02-12 00:48:50.000000000 -0600
@@ -603,9 +603,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 +
@@ -613,7 +611,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
@@ -623,7 +620,6 @@
                                        wBoundingShape(pWin), 
                                        x - pWin->drawable.x, 
                                        y - pWin->drawable.y, &box))
-#endif
                )
             {
                rep.child = pWin->drawable.id;
diff -Nru3 xserver-old/configure.ac xserver/configure.ac
--- xserver-old/configure.ac    2004-02-12 00:27:34.000000000 -0600
+++ xserver/configure.ac        2004-02-12 00:28:10.000000000 -0600
@@ -85,7 +85,6 @@
 EXTENSION_INCS='-I$(top_srcdir)/Xext'
 
 AC_ARG_ENABLE(werror,        [  --enable-werror ],[WERROR=$enableval]
[WERROR=no])
-AC_ARG_ENABLE(shape,         [  --disable-shape ],[SHAPE=$enableval]
[SHAPE=yes])
 AC_ARG_ENABLE(xv,            [  --disable-xv ],[XV=$enableval],[XV=yes])
 AC_ARG_ENABLE(composite,     [  --disable-composite ]
[COMPOSITE=$enableval],[COMPOSITE=yes])
 AC_ARG_ENABLE(mitshm,        [  --disable-shm ],[MITSHM=$enableval]
[MITSHM=yes])
@@ -116,11 +115,6 @@
                                [ VENDOR_RELEASE="$withval" ],
                               
[ VENDOR_RELEASE="$DEFAULT_VENDOR_RELEASE" ])
 
-AM_CONDITIONAL(SHAPE, test x$SHAPE = xyes)
-if test "$SHAPE" = yes; then
-       AC_DEFINE(SHAPE,1,[Support SHAPE extension])
-fi
-
 AM_CONDITIONAL(XV, [test x$XV = xyes])
 if test "$XV" = yes; then
        AC_DEFINE(XV,1,[Support Xv Extension])
diff -Nru3 xserver-old/dix/dispatch.c xserver/dix/dispatch.c
--- xserver-old/dix/dispatch.c  2004-01-15 02:56:18.000000000 -0600
+++ xserver/dix/dispatch.c      2004-02-12 00:44:11.000000000 -0600
@@ -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;
diff -Nru3 xserver-old/dix/events.c xserver/dix/events.c
--- xserver-old/dix/events.c    2003-09-11 00:12:50.000000000 -0500
+++ xserver/dix/events.c        2004-02-12 00:45:39.000000000 -0600
@@ -190,9 +190,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 */
@@ -644,7 +642,6 @@
     (*inputInfo.pointer->public.processInputProc)(&xE, inputInfo.pointer,
1);
 }
 
-#ifdef SHAPE
 static void
 #if NeedFunctionPrototypes
 ConfineToShape(RegionPtr shape, int *px, int *py)
@@ -686,7 +683,6 @@
     *px = x;
     *py = y;
 }
-#endif
 
 static void
 #if NeedFunctionPrototypes
@@ -726,10 +722,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))
     {
@@ -784,10 +778,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;
@@ -818,10 +810,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);
     }
@@ -2000,13 +1990,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)
@@ -2058,10 +2046,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))
@@ -2133,9 +2119,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);
@@ -2381,10 +2365,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())
diff -Nru3 xserver-old/dix/window.c xserver/dix/window.c
--- xserver-old/dix/window.c    2003-11-19 21:31:29.000000000 -0600
+++ xserver/dix/window.c        2004-02-12 00:47:48.000000000 -0600
@@ -438,10 +438,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
@@ -842,12 +840,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)
@@ -1658,7 +1654,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)
 
@@ -1670,7 +1665,6 @@
            REGION_INTERSECT(pScreen, pRgn, pRgn, wClipShape (pWin));
        REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x, pWin->drawable.y);
     }
-#endif
     return pRgn;
 }
 
@@ -1694,7 +1688,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)
 
@@ -1709,7 +1702,6 @@
        REGION_TRANSLATE(pScreen, &pWin->winSize, pWin->drawable.x,
                         pWin->drawable.y);
     }
-#endif
 }
 
 void
@@ -1736,7 +1728,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)
 
@@ -1749,7 +1740,6 @@
            REGION_UNION(pScreen, &pWin->borderSize, &pWin->borderSize,
                         &pWin->winSize);
        }
-#endif
     } else {
        REGION_COPY(pWin->drawable.pScreen, &pWin->borderSize,
                                               &pWin->winSize);
@@ -1949,7 +1939,6 @@
     return(pBox);
 }
 
-#ifdef SHAPE
 #define IS_SHAPED(pWin)        (wBoundingShape (pWin) != (RegionPtr) NULL)
 
 static RegionPtr
@@ -2005,7 +1994,6 @@
     REGION_DESTROY(pScreen, pSibRgn);
     return ret;
 }
-#endif
 
 static Bool
 #if NeedFunctionPrototypes
@@ -2029,9 +2017,7 @@
        {
            sbox = WindowExtents(pSib, &sboxrec);
            if (BOXES_OVERLAP(sbox, box)
-#ifdef SHAPE
            && ShapeOverlap (pWin, box, pSib, sbox)
-#endif
            )
                return(TRUE);
        }
@@ -2060,9 +2046,7 @@
        {
            sbox = WindowExtents(pSib, &sboxrec);
            if (BOXES_OVERLAP(sbox, box)
-#ifdef SHAPE
            && ShapeOverlap (pWin, box, pSib, sbox)
-#endif
            )
                return(TRUE);
        }
@@ -3725,12 +3709,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;
@@ -3773,10 +3755,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
diff -Nru3 xserver-old/hw/xnest/Window.c xserver/hw/xnest/Window.c
--- xserver-old/hw/xnest/Window.c       2004-02-04 09:51:20.000000000 -0600
+++ xserver/hw/xnest/Window.c   2004-02-12 00:42:20.000000000 -0600
@@ -128,12 +128,10 @@
   xnestWindowPriv(pWin)->sibling_above = None;
   if (pWin->nextSib)
     xnestWindowPriv(pWin->nextSib)->sibling_above = xnestWindow(pWin);
-#ifdef SHAPE
   xnestWindowPriv(pWin)->bounding_shape = 
     REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
   xnestWindowPriv(pWin)->clip_shape = 
     REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
-#endif /* SHAPE */
 
   if (!pWin->parent) /* only the root window will have the right colormap
*/
     xnestSetInstalledColormapWindows(pWin->drawable.pScreen);
@@ -146,12 +144,10 @@
   if (pWin->nextSib)
     xnestWindowPriv(pWin->nextSib)->sibling_above = 
       xnestWindowPriv(pWin)->sibling_above;
-#ifdef SHAPE
   REGION_DESTROY(pWin->drawable.pScreen, 
                                xnestWindowPriv(pWin)->bounding_shape);
   REGION_DESTROY(pWin->drawable.pScreen, 
                                xnestWindowPriv(pWin)->clip_shape);
-#endif
   XDestroyWindow(xnestDisplay, xnestWindow(pWin));
   xnestWindowPriv(pWin)->window = None;
 
@@ -354,9 +350,7 @@
 Bool xnestRealizeWindow(WindowPtr pWin)
 {
   xnestConfigureWindow(pWin, CWStackingOrder);
-#ifdef SHAPE
   xnestShapeWindow(pWin);
-#endif /* SHAPE */
   XMapWindow(xnestDisplay, xnestWindow(pWin));
 
   return True;
@@ -398,9 +392,7 @@
 void xnestClipNotify(WindowPtr pWin, int dx, int dy)
 {
   xnestConfigureWindow(pWin, CWStackingOrder); 
-#ifdef SHAPE
   xnestShapeWindow(pWin);
-#endif /* SHAPE */
 }
 
 static Bool xnestWindowExposurePredicate(Display *display, XEvent *event,
XPointer ptr)
@@ -435,7 +427,6 @@
   miWindowExposures(pWin, pRgn, other_exposed);
 }
 
-#ifdef SHAPE
 static Bool xnestRegionEqual(RegionPtr pReg1, RegionPtr pReg2)
 {
   BoxPtr pBox1, pBox2;
@@ -529,4 +520,3 @@
     }
   }
 }
-#endif /* SHAPE */
diff -Nru3 xserver-old/hw/xnest/XNWindow.h xserver/hw/xnest/XNWindow.h
--- xserver-old/hw/xnest/XNWindow.h     2003-11-02 13:56:10.000000000 -0600
+++ xserver/hw/xnest/XNWindow.h 2004-02-12 00:42:37.000000000 -0600
@@ -25,10 +25,8 @@
   unsigned int height;
   unsigned int border_width;
   Window sibling_above;
-#ifdef SHAPE
   RegionPtr bounding_shape;
   RegionPtr clip_shape;
-#endif /* SHAPE */
 } xnestPrivWin;
 
 typedef struct {
@@ -72,8 +70,6 @@
 void xnestCopyWindow(WindowPtr pWin, DDXPointRec oldOrigin, RegionPtr
oldRegion);
 void xnestClipNotify(WindowPtr pWin, int dx, int dy);
 void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr
other_exposed);
-#ifdef SHAPE
 void xnestShapeWindow(WindowPtr pWin);
-#endif /* SHAPE */
 
 #endif /* XNESTWINDOW_H */
diff -Nru3 xserver-old/hw/xwin/win.h xserver/hw/xwin/win.h
--- xserver-old/hw/xwin/win.h   2003-10-26 22:49:48.000000000 -0600
+++ xserver/hw/xwin/win.h       2004-02-12 00:43:30.000000000 -0600
@@ -547,9 +547,7 @@
   ClipNotifyProcPtr                    ClipNotify;
   RestackWindowProcPtr                 RestackWindow;
   ReparentWindowProcPtr                        ReparentWindow;
-#ifdef SHAPE
   SetShapeProcPtr                      SetShape;
-#endif
 } winPrivScreenRec;
 
 
@@ -1421,10 +1419,8 @@
 Bool
 winMapWindowPRootless (WindowPtr pWindow);
 
-#ifdef SHAPE
 void
 winSetShapePRootless (WindowPtr pWindow);
-#endif
 
 
 /*
@@ -1442,7 +1438,6 @@
  * winmultiwindowshape.c
  */
 
-#ifdef SHAPE
 void
 winReshapeMultiWindow (WindowPtr pWin);
 
@@ -1451,7 +1446,6 @@
 
 void
 winUpdateRgnMultiWindow (WindowPtr pWindow);
-#endif
 
 
 /*
diff -Nru3 xserver-old/hw/xwin/winmultiwindowshape.c
xserver/hw/xwin/winmultiwindowshape.c
--- xserver-old/hw/xwin/winmultiwindowshape.c   2003-10-26
22:49:48.000000000
-0600
+++ xserver/hw/xwin/winmultiwindowshape.c       2004-02-12
00:38:08.000000000
-0600
@@ -30,8 +30,6 @@
  */
 /* $XFree86: xc/programs/Xserver/hw/xwin/winwindow.c,v 1.5 2002/11/07
10:31:32 alanh Exp $ */
 
-#ifdef SHAPE
-
 #include "win.h"
 
 
@@ -209,4 +207,3 @@
   
   return;
 }
-#endif
diff -Nru3 xserver-old/hw/xwin/winmultiwindowwindow.c
xserver/hw/xwin/winmultiwindowwindow.c
--- xserver-old/hw/xwin/winmultiwindowwindow.c  2003-10-26
22:49:48.000000000
-0600
+++ xserver/hw/xwin/winmultiwindowwindow.c      2004-02-12
00:38:19.000000000
-0600
@@ -328,11 +328,9 @@
   /* Refresh/redisplay the Windows window associated with this X window */
   winUpdateWindowsWindow (pWin);
 
-#ifdef SHAPE
   /* Update the Windows window's shape */
   winReshapeMultiWindow (pWin);
   winUpdateRgnMultiWindow (pWin);
-#endif
 
   return fResult;
 }
diff -Nru3 xserver-old/hw/xwin/winscrinit.c xserver/hw/xwin/winscrinit.c
--- xserver-old/hw/xwin/winscrinit.c    2003-10-26 22:49:48.000000000 -0600
+++ xserver/hw/xwin/winscrinit.c        2004-02-12 00:38:40.000000000 -0600
@@ -425,9 +425,7 @@
       WRAP(UnrealizeWindow);
       WRAP(PositionWindow);
       WRAP(ChangeWindowAttributes);
-#ifdef SHAPE
       WRAP(SetShape);
-#endif
 
       /* Assign pseudo-rootless window procedures to be top level
procedures */
       pScreen->CreateWindow = winCreateWindowPRootless;
@@ -436,9 +434,7 @@
       pScreen->ChangeWindowAttributes = winChangeWindowAttributesPRootless;
       pScreen->RealizeWindow = winMapWindowPRootless;
       pScreen->UnrealizeWindow = winUnmapWindowPRootless;
-#ifdef SHAPE
       pScreen->SetShape = winSetShapePRootless;
-#endif
 
       /* Undefine the WRAP macro, as it is not needed elsewhere */
 #undef WRAP
@@ -464,9 +460,7 @@
       WRAP(ChangeWindowAttributes);
       WRAP(ReparentWindow);
       WRAP(RestackWindow);
-#ifdef SHAPE
       WRAP(SetShape);
-#endif
 
       /* Assign multi-window window procedures to be top level procedures
*/
       pScreen->CreateWindow = winCreateWindowMultiWindow;
@@ -477,9 +471,7 @@
       pScreen->UnrealizeWindow = winUnmapWindowMultiWindow;
       pScreen->ReparentWindow = winReparentWindowMultiWindow;
       pScreen->RestackWindow = winRestackWindowMultiWindow;
-#ifdef SHAPE
       pScreen->SetShape = winSetShapeMultiWindow;
-#endif
 
       /* Undefine the WRAP macro, as it is not needed elsewhere */
 #undef WRAP
diff -Nru3 xserver-old/hw/xwin/winwindow.c xserver/hw/xwin/winwindow.c
--- xserver-old/hw/xwin/winwindow.c     2003-10-26 22:49:48.000000000 -0600
+++ xserver/hw/xwin/winwindow.c 2004-02-12 00:41:05.000000000 -0600
@@ -43,11 +43,9 @@
 void
 winUpdateRgnPRootless (WindowPtr pWindow);
 
-#ifdef SHAPE
 static
 void
 winReshapePRootless (WindowPtr pWin);
-#endif
 
 
 /* See Porting Layer Definition - p. 37 */
@@ -353,7 +351,6 @@
 }
 
 
-#ifdef SHAPE
 void
 winSetShapePRootless (WindowPtr pWin)
 {
@@ -368,7 +365,6 @@
   
   return;
 }
-#endif
 
 
 /*
@@ -459,7 +455,6 @@
 }
 
 
-#ifdef SHAPE
 static
 void
 winReshapePRootless (WindowPtr pWin)
@@ -538,4 +533,3 @@
   
   return;
 }
-#endif
diff -Nru3 xserver-old/include/scrnintstr.h xserver/include/scrnintstr.h
--- xserver-old/include/scrnintstr.h    2004-01-15 02:53:45.000000000 -0600
+++ xserver/include/scrnintstr.h        2004-02-12 00:36:24.000000000 -0600
@@ -513,10 +513,8 @@
     WindowPtr /*pWin*/,
     WindowPtr /*pPriorParent*/);
 
-#ifdef SHAPE
 typedef    void (* SetShapeProcPtr)(
        WindowPtr /*pWin*/);
-#endif /* SHAPE */
 
 typedef    void (* ChangeBorderWidthProcPtr)(
        WindowPtr /*pWin*/,
@@ -704,9 +702,7 @@
     HandleExposuresProcPtr     HandleExposures;
     ReparentWindowProcPtr      ReparentWindow;
 
-#ifdef SHAPE
     SetShapeProcPtr            SetShape;
-#endif /* SHAPE */
 
     ChangeBorderWidthProcPtr   ChangeBorderWidth;
     MarkUnrealizedWindowProcPtr        MarkUnrealizedWindow;
diff -Nru3 xserver-old/include/windowstr.h xserver/include/windowstr.h
--- xserver-old/include/windowstr.h     2003-11-04 23:45:31.000000000 -0600
+++ xserver/include/windowstr.h 2004-02-12 00:37:02.000000000 -0600
@@ -83,10 +83,8 @@
     PropertyPtr                userProps;         /* default: NULL */
     unsigned long      backingBitPlanes;  /* default: ~0L */
     unsigned long      backingPixel;      /* default: 0 */
-#ifdef SHAPE
     RegionPtr          boundingShape;     /* default: NULL */
     RegionPtr          clipShape;         /* default: NULL */
-#endif
 #ifdef XINPUT
     struct _OtherInputMasks *inputMasks;   /* default: NULL */
 #endif
@@ -171,20 +169,14 @@
 #define wUserProps(w)          wUseDefault(w, userProps, NULL)
 #define wBackingBitPlanes(w)   wUseDefault(w, backingBitPlanes, ~0L)
 #define wBackingPixel(w)       wUseDefault(w, backingPixel, 0)
-#ifdef SHAPE
 #define wBoundingShape(w)      wUseDefault(w, boundingShape, NULL)
 #define wClipShape(w)          wUseDefault(w, clipShape, NULL)
-#endif
 #define wClient(w)             (clients[CLIENT_ID((w)->drawable.id)])
 #define wBorderWidth(w)                ((int) (w)->borderWidth)
 
 /* true when w needs a border drawn. */
 
-#ifdef SHAPE
 #define HasBorder(w)   ((w)->borderWidth || wClipShape(w))
-#else
-#define HasBorder(w)   ((w)->borderWidth)
-#endif
 
 typedef struct _ScreenSaverStuff {
     WindowPtr pWindow;
diff -Nru3 xserver-old/mi/mibstore.c xserver/mi/mibstore.c
--- xserver-old/mi/mibstore.c   2003-09-11 00:12:51.000000000 -0500
+++ xserver/mi/mibstore.c       2004-02-12 00:34:32.000000000 -0600
@@ -2620,14 +2620,12 @@
        REGION_TRANSLATE( pScreen, pSavedRegion,
                                      -pWin->drawable.x,
                                      -pWin->drawable.y);
-#ifdef SHAPE
        if (wBoundingShape (pWin))
            REGION_INTERSECT(pScreen, pSavedRegion, pSavedRegion,
                             wBoundingShape (pWin));
        if (wClipShape (pWin))
            REGION_INTERSECT(pScreen, pSavedRegion, pSavedRegion,
                             wClipShape (pWin));
-#endif
        /* if window is already on-screen, assume it has been drawn to */
        if (pWin->viewable)
            pBackingStore->status = StatusVDirty;
@@ -3037,14 +3035,12 @@
        REGION_TRANSLATE( pScreen, prgnSaved,
                                      -pWin->drawable.x,
                                      -pWin->drawable.y);
-#ifdef SHAPE
        if (wBoundingShape (pWin))
            REGION_INTERSECT(pScreen, prgnSaved, prgnSaved,
                             wBoundingShape (pWin));
        if (wClipShape (pWin))
            REGION_INTERSECT(pScreen, prgnSaved, prgnSaved,
                             wClipShape (pWin));
-#endif
        miTileVirtualBS(pWin);
 
        exposures = REGION_CREATE( pScreen, &box, 1);
@@ -3151,7 +3147,6 @@
 
     REGION_TRANSLATE( pScreen, newSaved,
                        -pWin->drawable.x, -pWin->drawable.y);
-#ifdef SHAPE
     if (wBoundingShape (pWin) || wClipShape (pWin)) {
        if (wBoundingShape (pWin))
            REGION_INTERSECT( pScreen, newSaved, newSaved,
@@ -3159,7 +3154,6 @@
        if (wClipShape (pWin))
            REGION_INTERSECT( pScreen, newSaved, newSaved, wClipShape
(pWin));
     }
-#endif
     
     pSavedRegion = &pBackingStore->SavedRegion;
 
diff -Nru3 xserver-old/mi/miexpose.c xserver/mi/miexpose.c
--- xserver-old/mi/miexpose.c   2003-09-11 00:12:51.000000000 -0500
+++ xserver/mi/miexpose.c       2004-02-12 00:34:09.000000000 -0600
@@ -260,7 +260,6 @@
     extents = pGC->graphicsExposures &&
              (REGION_NUM_RECTS(&rgnExposed) > RECTLIMIT) &&
              (pDstDrawable->type != DRAWABLE_PIXMAP);
-#ifdef SHAPE
     if (pSrcWin)
     {
        RegionPtr       region;
@@ -274,7 +273,6 @@
            (RECT_IN_REGION(pscr, region, &srcBox) != rgnIN))
                extents = FALSE;
     }
-#endif
     if (extents)
     {
        WindowPtr pWin = (WindowPtr)pDstDrawable;
diff -Nru3 xserver-old/mi/miinitext.c xserver/mi/miinitext.c
--- xserver-old/mi/miinitext.c  2004-02-12 00:27:34.000000000 -0600
+++ xserver/mi/miinitext.c      2004-02-12 00:33:50.000000000 -0600
@@ -123,9 +123,7 @@
 #ifdef XTESTEXT1
 extern void XTestExtension1Init(INITARGS);
 #endif
-#ifdef SHAPE
 extern void ShapeExtensionInit(INITARGS);
-#endif
 #ifdef EVI
 extern void EVIExtensionInit(INITARGS);
 #endif
@@ -246,9 +244,7 @@
 #ifdef XTESTEXT1
     if (!noTestExtensions) XTestExtension1Init();
 #endif
-#ifdef SHAPE
     ShapeExtensionInit();
-#endif
 #ifdef MITSHM
     ShmExtensionInit();
 #endif
diff -Nru3 xserver-old/mi/mioverlay.c xserver/mi/mioverlay.c
--- xserver-old/mi/mioverlay.c  2003-09-11 00:12:51.000000000 -0500
+++ xserver/mi/mioverlay.c      2004-02-12 00:33:06.000000000 -0600
@@ -80,9 +80,7 @@
                                        unsigned int, WindowPtr);
 static void miOverlayClearToBackground(WindowPtr, int, int, int, int,
Bool);
 
-#ifdef SHAPE
 static void miOverlaySetShape(WindowPtr);
-#endif
 static void miOverlayChangeBorderWidth(WindowPtr, unsigned int);
 
 #define MIOVERLAY_GET_SCREEN_PRIVATE(pScreen) \
@@ -157,9 +155,7 @@
     pScreen->ResizeWindow = miOverlayResizeWindow;
     pScreen->MarkWindow = miOverlayMarkWindow;
     pScreen->ClearToBackground = miOverlayClearToBackground;
-#ifdef SHAPE
     pScreen->SetShape = miOverlaySetShape;
-#endif
     pScreen->ChangeBorderWidth = miOverlayChangeBorderWidth;
 
     return TRUE;
@@ -489,7 +485,6 @@
            break;
        case rgnPART:
            newVis = VisibilityPartiallyObscured;
-#ifdef SHAPE
            {
                RegionPtr   pBounding;
 
@@ -508,7 +503,6 @@
                    }
                }
            }
-#endif
            break;
        default:
            newVis = VisibilityFullyObscured;
@@ -1573,7 +1567,6 @@
 }
 
 
-#ifdef SHAPE
 static void
 miOverlaySetShape(WindowPtr pWin)
 {
@@ -1661,8 +1654,6 @@
        WindowsRestructured ();
     CheckCursorConfinement(pWin);
 }
-#endif
-
 
 
 static void
diff -Nru3 xserver-old/mi/miscrinit.c xserver/mi/miscrinit.c
--- xserver-old/mi/miscrinit.c  2003-11-02 13:56:10.000000000 -0600
+++ xserver/mi/miscrinit.c      2004-02-12 00:34:43.000000000 -0600
@@ -306,9 +306,7 @@
     pScreen->HandleExposures = miHandleValidateExposures;
     pScreen->ReparentWindow = (ReparentWindowProcPtr) 0;
     pScreen->ChangeBorderWidth = miChangeBorderWidth;
-#ifdef SHAPE
     pScreen->SetShape = miSetShape;
-#endif
     pScreen->MarkUnrealizedWindow = miMarkUnrealizedWindow;
 
     pScreen->SaveDoomedAreas = 0;
diff -Nru3 xserver-old/mi/mivaltree.c xserver/mi/mivaltree.c
--- xserver-old/mi/mivaltree.c  2003-11-09 22:57:17.000000000 -0600
+++ xserver/mi/mivaltree.c      2004-02-12 00:35:15.000000000 -0600
@@ -97,7 +97,6 @@
 
 #include    "globals.h"
 
-#ifdef SHAPE
 /*
  * Compute the visibility of a shaped window
  */
@@ -160,7 +159,6 @@
        return rgnIN;
     return rgnOUT;
 }
-#endif
 
 static GetRedirectBorderClipProcPtr    miGetRedirectBorderClipProc;
 static SetRedirectBorderClipProcPtr    miSetRedirectBorderClipProc;
@@ -239,7 +237,6 @@
            break;
        case rgnPART:
            newVis = VisibilityPartiallyObscured;
-#ifdef SHAPE
            {
                RegionPtr   pBounding;
 
@@ -259,7 +256,6 @@
                    }
                }
            }
-#endif
            break;
        default:
            newVis = VisibilityFullyObscured;
diff -Nru3 xserver-old/mi/miwindow.c xserver/mi/miwindow.c
--- xserver-old/mi/miwindow.c   2003-09-11 00:12:51.000000000 -0500
+++ xserver/mi/miwindow.c       2004-02-12 00:35:43.000000000 -0600
@@ -966,7 +966,6 @@
     return pWin->firstChild;
 }
 
-#ifdef SHAPE
 /******
  *
  * miSetShape
@@ -1070,7 +1069,6 @@
        WindowsRestructured ();
     CheckCursorConfinement(pWin);
 }
-#endif
 
 /* Keeps the same inside(!) origin */
 
diff -Nru3 xserver-old/miext/rootless/rootlessCommon.h
xserver/miext/rootless/rootlessCommon.h
--- xserver-old/miext/rootless/rootlessCommon.h 2003-09-11
00:12:51.000000000 -0500
+++ xserver/miext/rootless/rootlessCommon.h     2004-02-12
00:31:19.000000000
-0600
@@ -91,9 +91,7 @@
     MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
     ValidateTreeProcPtr ValidateTree;
 
-#ifdef SHAPE
     SetShapeProcPtr SetShape;
-#endif
 
 #ifdef RENDER
     CompositeProcPtr Composite;
diff -Nru3 xserver-old/miext/rootless/rootlessScreen.c
xserver/miext/rootless/rootlessScreen.c
--- xserver-old/miext/rootless/rootlessScreen.c 2003-09-11
00:12:51.000000000 -0500
+++ xserver/miext/rootless/rootlessScreen.c     2004-02-12
00:31:47.000000000
-0600
@@ -615,10 +615,7 @@
     WRAP(MarkOverlappedWindows);
     WRAP(ValidateTree);
     WRAP(ChangeWindowAttributes);
-
-#ifdef SHAPE
     WRAP(SetShape);
-#endif
 
 #ifdef RENDER
     {
diff -Nru3 xserver-old/miext/rootless/rootlessValTree.c
xserver/miext/rootless/rootlessValTree.c
--- xserver-old/miext/rootless/rootlessValTree.c        2003-09-11
00:12:51.000000000 -0500
+++ xserver/miext/rootless/rootlessValTree.c    2004-02-12
00:32:13.000000000
-0600
@@ -97,7 +97,6 @@
 
 #include    "globals.h"
 
-#ifdef SHAPE
 /*
  * Compute the visibility of a shaped window
  */
@@ -160,7 +159,6 @@
        return rgnIN;
     return rgnOUT;
 }
-#endif
 
 #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \
                                    HasBorder(w) && \
@@ -228,7 +226,6 @@
            break;
        case rgnPART:
            newVis = VisibilityPartiallyObscured;
-#ifdef SHAPE
            {
                RegionPtr   pBounding;
 
@@ -248,7 +245,6 @@
                    }
                }
            }
-#endif
            break;
        default:
            newVis = VisibilityFullyObscured;
diff -Nru3 xserver-old/miext/rootless/rootlessWindow.c
xserver/miext/rootless/rootlessWindow.c
--- xserver-old/miext/rootless/rootlessWindow.c 2003-09-11
00:12:51.000000000 -0500
+++ xserver/miext/rootless/rootlessWindow.c     2004-02-12
00:30:47.000000000
-0600
@@ -137,8 +137,6 @@
 }
 
 
-#ifdef SHAPE
-
 static Bool
 RootlessGetShape(WindowPtr pWin, RegionPtr pShape)
 {
@@ -215,8 +213,6 @@
     RootlessReshapeFrame(pWin);
 }
 
-#endif // SHAPE
-
 
 /* Disallow ParentRelative background on top-level windows
    because the root window doesn't really have the right background
@@ -329,10 +325,8 @@
 {
     ScreenPtr pScreen = pWin->drawable.pScreen;
     RootlessWindowRec *winRec;
-#ifdef SHAPE
     RegionRec shape;
     RegionPtr pShape = NULL;
-#endif
 
     if (WINREC(pWin) != NULL)
         return WINREC(pWin);
@@ -357,11 +351,9 @@
 
     WINREC(pWin) = winRec;
 
-#ifdef SHAPE
     // Set the frame's shape if the window is shaped
     if (RootlessGetShape(pWin, &shape))
         pShape = &shape;
-#endif
 
     RL_DEBUG_MSG("creating frame ");
 
@@ -375,10 +367,8 @@
         return NULL;
     }
 
-#ifdef SHAPE
     if (pShape != NULL)
         REGION_UNINIT (pScreen, &shape);
-#endif
 
     return winRec;
 }
diff -Nru3 xserver-old/miext/rootless/rootlessWindow.h
xserver/miext/rootless/rootlessWindow.h
--- xserver-old/miext/rootless/rootlessWindow.h 2003-09-11
00:12:51.000000000 -0500
+++ xserver/miext/rootless/rootlessWindow.h     2004-02-12
00:30:58.000000000
-0600
@@ -37,9 +37,7 @@
 Bool RootlessCreateWindow(WindowPtr pWin);
 Bool RootlessDestroyWindow(WindowPtr pWin);
 
-#ifdef SHAPE
 void RootlessSetShape(WindowPtr pWin);
-#endif // SHAPE
 
 Bool RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask);
 Bool RootlessPositionWindow(WindowPtr pWin, int x, int y);
diff -Nru3 xserver-old/xfixes/region.c xserver/xfixes/region.c
--- xserver-old/xfixes/region.c 2003-11-21 18:49:11.000000000 -0600
+++ xserver/xfixes/region.c     2004-02-12 00:29:36.000000000 -0600
@@ -31,9 +31,7 @@
 #endif
 #include <regionstr.h>
 #include <gcstruct.h>
-#ifdef SHAPE
 #include <shapeint.h>
-#endif
 
 RESTYPE            RegionResType;
 
@@ -168,20 +166,16 @@
     }
     switch (stuff->kind) {
     case WindowRegionBounding:
-#ifdef SHAPE
        pRegion = wBoundingShape(pWin);
        if (!pRegion)
-#endif
        {
            pRegion = CreateBoundingShape (pWin);
            copy = FALSE;
        }
        break;
     case WindowRegionClip:
-#ifdef SHAPE
        pRegion = wClipShape(pWin);
        if (!pRegion)
-#endif
        {
            pRegion = CreateClipShape (pWin);
            copy = FALSE;
@@ -670,7 +664,6 @@
 int
 ProcXFixesSetWindowShapeRegion (ClientPtr client)
 {
-#ifdef SHAPE
     WindowPtr      pWin;
     ScreenPtr      pScreen;
     RegionPtr      pRegion;
@@ -730,9 +723,6 @@
     (*pScreen->SetShape) (pWin);
     SendShapeNotify (pWin, stuff->destKind);
     return (client->noClientException);
-#else
-    return BadRequest;
-#endif
 }
 
 int

-- 
Warren Turkal
President, GOLUM, Inc.
http://www.golum.org