[PATCH] new patch that makes Shape always build

Warren Turkal wt@midsouth.rr.com
Thu, 12 Feb 2004 12:49:42 -0600


This is a new version of this patch that applies cleanly after the getting
rid of NeedFunctionPrototypes patch that I committed to xserver.

Make the shape extension always build

? compile
Index: configure.ac
===================================================================
RCS file: /cvs/xserver/xserver/configure.ac,v
retrieving revision 3.53
diff -u -3 -p -r3.53 configure.ac
--- configure.ac        9 Feb 2004 12:45:44 -0000       3.53
+++ configure.ac        12 Feb 2004 18:42:12 -0000
@@ -85,7 +85,6 @@ EXTENSION_LIBS='$(top_builddir)/Xext/lib
 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 @@ AC_ARG_WITH(vendor-release,  [  --with-v
                                [ 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])
Index: Xext/panoramiXprocs.c
===================================================================
RCS file: /cvs/xserver/xserver/Xext/panoramiXprocs.c,v
retrieving revision 3.36
diff -u -3 -p -r3.36 panoramiXprocs.c
--- Xext/panoramiXprocs.c       11 Sep 2003 05:12:50 -0000      3.36
+++ Xext/panoramiXprocs.c       12 Feb 2004 18:42:12 -0000
@@ -603,9 +603,7 @@ int PanoramiXTranslateCoords(ClientPtr c
     }
     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 @@ int PanoramiXTranslateCoords(ClientPtr c
                (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 @@ int PanoramiXTranslateCoords(ClientPtr c
                                        wBoundingShape(pWin), 
                                        x - pWin->drawable.x, 
                                        y - pWin->drawable.y, &box))
-#endif
                )
             {
                rep.child = pWin->drawable.id;
Index: dix/dispatch.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/dispatch.c,v
retrieving revision 3.33
diff -u -3 -p -r3.33 dispatch.c
--- dix/dispatch.c      15 Jan 2004 08:56:18 -0000      3.33
+++ dix/dispatch.c      12 Feb 2004 18:42:13 -0000
@@ -1265,9 +1265,7 @@ ProcTranslateCoords(client)
        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 @@ ProcTranslateCoords(client)
                (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 @@ ProcTranslateCoords(client)
                && (!wBoundingShape(pWin) ||
                    POINT_IN_REGION(pWin->drawable.pScreen, 
                                        &pWin->borderSize, x, y, &box))
-#endif
                )
             {
                rep.child = pWin->drawable.id;
Index: dix/events.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/events.c,v
retrieving revision 3.51
diff -u -3 -p -r3.51 events.c
--- dix/events.c        12 Feb 2004 18:37:11 -0000      3.51
+++ dix/events.c        12 Feb 2004 18:42:14 -0000
@@ -186,9 +186,7 @@ static  struct {
     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 @@ SyntheticMotion(int x, int y)
     (*inputInfo.pointer->public.processInputProc)(&xE, inputInfo.pointer,
1);
 }
 
-#ifdef SHAPE
 static void
 ConfineToShape(RegionPtr shape, int *px, int *py)
 {
@@ -667,7 +664,6 @@ ConfineToShape(RegionPtr shape, int *px,
     *px = x;
     *py = y;
 }
-#endif
 
 static void
 CheckPhysLimits(
@@ -699,10 +695,8 @@ CheckPhysLimits(
     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 @@ CheckVirtualMotion(
            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 @@ ConfineCursorToWindow(WindowPtr pWin, Bo
     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 @@ XYToWindow(int x, int y)
                (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 @@ CheckMotion(xEvent *xE)
            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 @@ DefineInitialRootWindow(win)
        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 @@ ProcWarpPointer(client)
            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: dix/window.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/window.c,v
retrieving revision 3.40
diff -u -3 -p -r3.40 window.c
--- dix/window.c        12 Feb 2004 18:37:11 -0000      3.40
+++ dix/window.c        12 Feb 2004 18:42:14 -0000
@@ -426,10 +426,8 @@ CreateRootWindow(pScreen)
     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 @@ FreeWindowResources(register WindowPtr p
     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 @@ CreateUnclippedWinSize (pWin)
     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 @@ CreateUnclippedWinSize (pWin)
            REGION_INTERSECT(pScreen, pRgn, pRgn, wClipShape (pWin));
        REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x, pWin->drawable.y);
     }
-#endif
     return pRgn;
 }
 
@@ -1672,7 +1666,6 @@ SetWinSize (WindowPtr pWin)
                         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 @@ SetWinSize (WindowPtr pWin)
        REGION_TRANSLATE(pScreen, &pWin->winSize, pWin->drawable.x,
                         pWin->drawable.y);
     }
-#endif
 }
 
 void
@@ -1714,7 +1706,6 @@ SetBorderSize (WindowPtr pWin)
                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 @@ SetBorderSize (WindowPtr pWin)
            REGION_UNION(pScreen, &pWin->borderSize, &pWin->borderSize,
                         &pWin->winSize);
        }
-#endif
     } else {
        REGION_COPY(pWin->drawable.pScreen, &pWin->borderSize,
                                               &pWin->winSize);
@@ -1916,7 +1906,6 @@ WindowExtents(
     return(pBox);
 }
 
-#ifdef SHAPE
 #define IS_SHAPED(pWin)        (wBoundingShape (pWin) != (RegionPtr) NULL)
 
 static RegionPtr
@@ -1960,7 +1949,6 @@ ShapeOverlap (
     REGION_DESTROY(pScreen, pSibRgn);
     return ret;
 }
-#endif
 
 static Bool
 AnyWindowOverlapsMe(
@@ -1978,9 +1966,7 @@ AnyWindowOverlapsMe(
        {
            sbox = WindowExtents(pSib, &sboxrec);
            if (BOXES_OVERLAP(sbox, box)
-#ifdef SHAPE
            && ShapeOverlap (pWin, box, pSib, sbox)
-#endif
            )
                return(TRUE);
        }
@@ -2003,9 +1989,7 @@ IOverlapAnyWindow(
        {
            sbox = WindowExtents(pSib, &sboxrec);
            if (BOXES_OVERLAP(sbox, box)
-#ifdef SHAPE
            && ShapeOverlap (pWin, box, pSib, sbox)
-#endif
            )
                return(TRUE);
        }
@@ -3629,12 +3613,10 @@ CheckWindowOptionalNeed (w)
        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 @@ MakeWindowOptional (pWin)
     optional->userProps = NULL;
     optional->backingBitPlanes = ~0L;
     optional->backingPixel = 0;
-#ifdef SHAPE
     optional->boundingShape = NULL;
     optional->clipShape = NULL;
-#endif
 #ifdef XINPUT
     optional->inputMasks = NULL;
 #endif
Index: hw/xnest/Window.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xnest/Window.c,v
retrieving revision 3.10
diff -u -3 -p -r3.10 Window.c
--- hw/xnest/Window.c   4 Feb 2004 15:51:20 -0000       3.10
+++ hw/xnest/Window.c   12 Feb 2004 18:42:14 -0000
@@ -128,12 +128,10 @@ Bool xnestCreateWindow(WindowPtr pWin)
   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 @@ Bool xnestDestroyWindow(WindowPtr pWin)
   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 xnestChangeWindowAttributes(WindowP
 Bool xnestRealizeWindow(WindowPtr pWin)
 {
   xnestConfigureWindow(pWin, CWStackingOrder);
-#ifdef SHAPE
   xnestShapeWindow(pWin);
-#endif /* SHAPE */
   XMapWindow(xnestDisplay, xnestWindow(pWin));
 
   return True;
@@ -398,9 +392,7 @@ void xnestCopyWindow(WindowPtr pWin, DDX
 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 @@ void xnestWindowExposures(WindowPtr pWin
   miWindowExposures(pWin, pRgn, other_exposed);
 }
 
-#ifdef SHAPE
 static Bool xnestRegionEqual(RegionPtr pReg1, RegionPtr pReg2)
 {
   BoxPtr pBox1, pBox2;
@@ -529,4 +520,3 @@ void xnestShapeWindow(WindowPtr pWin)
     }
   }
 }
-#endif /* SHAPE */
Index: hw/xnest/XNWindow.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/xnest/XNWindow.h,v
retrieving revision 1.3
diff -u -3 -p -r1.3 XNWindow.h
--- hw/xnest/XNWindow.h 2 Nov 2003 19:56:10 -0000       1.3
+++ hw/xnest/XNWindow.h 12 Feb 2004 18:42:14 -0000
@@ -25,10 +25,8 @@ typedef struct {
   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 xnestPaintWindowBorder(WindowPtr pW
 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 */
Index: hw/xwin/win.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/xwin/win.h,v
retrieving revision 1.39
diff -u -3 -p -r1.39 win.h
--- hw/xwin/win.h       27 Oct 2003 04:49:48 -0000      1.39
+++ hw/xwin/win.h       12 Feb 2004 18:42:14 -0000
@@ -547,9 +547,7 @@ typedef struct _winPrivScreenRec
   ClipNotifyProcPtr                    ClipNotify;
   RestackWindowProcPtr                 RestackWindow;
   ReparentWindowProcPtr                        ReparentWindow;
-#ifdef SHAPE
   SetShapeProcPtr                      SetShape;
-#endif
 } winPrivScreenRec;
 
 
@@ -1421,10 +1419,8 @@ winUnmapWindowPRootless (WindowPtr pWind
 Bool
 winMapWindowPRootless (WindowPtr pWindow);
 
-#ifdef SHAPE
 void
 winSetShapePRootless (WindowPtr pWindow);
-#endif
 
 
 /*
@@ -1442,7 +1438,6 @@ winUpdateIcon (Window id);
  * winmultiwindowshape.c
  */
 
-#ifdef SHAPE
 void
 winReshapeMultiWindow (WindowPtr pWin);
 
@@ -1451,7 +1446,6 @@ winSetShapeMultiWindow (WindowPtr pWindo
 
 void
 winUpdateRgnMultiWindow (WindowPtr pWindow);
-#endif
 
 
 /*
Index: hw/xwin/winmultiwindowshape.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xwin/winmultiwindowshape.c,v
retrieving revision 1.2
diff -u -3 -p -r1.2 winmultiwindowshape.c
--- hw/xwin/winmultiwindowshape.c       27 Oct 2003 04:49:48 -0000      1.2
+++ hw/xwin/winmultiwindowshape.c       12 Feb 2004 18:42:14 -0000
@@ -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 @@ winReshapeMultiWindow (WindowPtr pWin)
   
   return;
 }
-#endif
Index: hw/xwin/winmultiwindowwindow.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xwin/winmultiwindowwindow.c,v
retrieving revision 1.4
diff -u -3 -p -r1.4 winmultiwindowwindow.c
--- hw/xwin/winmultiwindowwindow.c      27 Oct 2003 04:49:48 -0000      1.4
+++ hw/xwin/winmultiwindowwindow.c      12 Feb 2004 18:42:14 -0000
@@ -328,11 +328,9 @@ winMapWindowMultiWindow (WindowPtr pWin)
   /* 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;
 }
Index: hw/xwin/winscrinit.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xwin/winscrinit.c,v
retrieving revision 1.29
diff -u -3 -p -r1.29 winscrinit.c
--- hw/xwin/winscrinit.c        27 Oct 2003 04:49:48 -0000      1.29
+++ hw/xwin/winscrinit.c        12 Feb 2004 18:42:14 -0000
@@ -425,9 +425,7 @@ winFinishScreenInitFB (int index,
       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 @@ winFinishScreenInitFB (int index,
       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 @@ winFinishScreenInitFB (int index,
       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 @@ winFinishScreenInitFB (int index,
       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
Index: hw/xwin/winwindow.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xwin/winwindow.c,v
retrieving revision 1.9
diff -u -3 -p -r1.9 winwindow.c
--- hw/xwin/winwindow.c 27 Oct 2003 04:49:48 -0000      1.9
+++ hw/xwin/winwindow.c 12 Feb 2004 18:42:15 -0000
@@ -43,11 +43,9 @@ static
 void
 winUpdateRgnPRootless (WindowPtr pWindow);
 
-#ifdef SHAPE
 static
 void
 winReshapePRootless (WindowPtr pWin);
-#endif
 
 
 /* See Porting Layer Definition - p. 37 */
@@ -353,7 +351,6 @@ winMapWindowPRootless (WindowPtr pWin)
 }
 
 
-#ifdef SHAPE
 void
 winSetShapePRootless (WindowPtr pWin)
 {
@@ -368,7 +365,6 @@ winSetShapePRootless (WindowPtr pWin)
   
   return;
 }
-#endif
 
 
 /*
@@ -459,7 +455,6 @@ winUpdateRgnPRootless (WindowPtr pWin)
 }
 
 
-#ifdef SHAPE
 static
 void
 winReshapePRootless (WindowPtr pWin)
@@ -538,4 +533,3 @@ winReshapePRootless (WindowPtr pWin)
   
   return;
 }
-#endif
Index: include/scrnintstr.h
===================================================================
RCS file: /cvs/xserver/xserver/include/scrnintstr.h,v
retrieving revision 1.14
diff -u -3 -p -r1.14 scrnintstr.h
--- include/scrnintstr.h        15 Jan 2004 08:53:45 -0000      1.14
+++ include/scrnintstr.h        12 Feb 2004 18:42:15 -0000
@@ -513,10 +513,8 @@ typedef    void (* ReparentWindowProcPtr
     WindowPtr /*pWin*/,
     WindowPtr /*pPriorParent*/);
 
-#ifdef SHAPE
 typedef    void (* SetShapeProcPtr)(
        WindowPtr /*pWin*/);
-#endif /* SHAPE */
 
 typedef    void (* ChangeBorderWidthProcPtr)(
        WindowPtr /*pWin*/,
@@ -704,9 +702,7 @@ typedef struct _Screen {
     HandleExposuresProcPtr     HandleExposures;
     ReparentWindowProcPtr      ReparentWindow;
 
-#ifdef SHAPE
     SetShapeProcPtr            SetShape;
-#endif /* SHAPE */
 
     ChangeBorderWidthProcPtr   ChangeBorderWidth;
     MarkUnrealizedWindowProcPtr        MarkUnrealizedWindow;
Index: include/windowstr.h
===================================================================
RCS file: /cvs/xserver/xserver/include/windowstr.h,v
retrieving revision 1.10
diff -u -3 -p -r1.10 windowstr.h
--- include/windowstr.h 5 Nov 2003 05:45:31 -0000       1.10
+++ include/windowstr.h 12 Feb 2004 18:42:15 -0000
@@ -83,10 +83,8 @@ typedef struct _WindowOpt {
     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 @@ extern Mask           DontPropagateMasks[];
 #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;
Index: mi/mibstore.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/mibstore.c,v
retrieving revision 1.12
diff -u -3 -p -r1.12 mibstore.c
--- mi/mibstore.c       11 Sep 2003 05:12:51 -0000      1.12
+++ mi/mibstore.c       12 Feb 2004 18:42:16 -0000
@@ -2620,14 +2620,12 @@ miBSAllocate(pWin)
        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 @@ miBSRestoreAreas(pWin, prgnExposed)
        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 @@ miBSTranslateBackingStore(pWin, windx, w
 
     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 @@ miBSTranslateBackingStore(pWin, windx, w
        if (wClipShape (pWin))
            REGION_INTERSECT( pScreen, newSaved, newSaved, wClipShape (pWin));
     }
-#endif
     
     pSavedRegion = &pBackingStore->SavedRegion;
 
Index: mi/miexpose.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/miexpose.c,v
retrieving revision 3.11
diff -u -3 -p -r3.11 miexpose.c
--- mi/miexpose.c       11 Sep 2003 05:12:51 -0000      3.11
+++ mi/miexpose.c       12 Feb 2004 18:42:16 -0000
@@ -260,7 +260,6 @@ miHandleExposures(pSrcDrawable, pDstDraw
     extents = pGC->graphicsExposures &&
              (REGION_NUM_RECTS(&rgnExposed) > RECTLIMIT) &&
              (pDstDrawable->type != DRAWABLE_PIXMAP);
-#ifdef SHAPE
     if (pSrcWin)
     {
        RegionPtr       region;
@@ -274,7 +273,6 @@ miHandleExposures(pSrcDrawable, pDstDraw
            (RECT_IN_REGION(pscr, region, &srcBox) != rgnIN))
                extents = FALSE;
     }
-#endif
     if (extents)
     {
        WindowPtr pWin = (WindowPtr)pDstDrawable;
Index: mi/miinitext.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/miinitext.c,v
retrieving revision 3.74
diff -u -3 -p -r3.74 miinitext.c
--- mi/miinitext.c      29 Dec 2003 06:24:01 -0000      3.74
+++ mi/miinitext.c      12 Feb 2004 18:42:16 -0000
@@ -123,9 +123,7 @@ extern void BezierExtensionInit(INITARGS
 #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 @@ InitExtensions(argc, argv)
 #ifdef XTESTEXT1
     if (!noTestExtensions) XTestExtension1Init();
 #endif
-#ifdef SHAPE
     ShapeExtensionInit();
-#endif
 #ifdef MITSHM
     ShmExtensionInit();
 #endif
Index: mi/mioverlay.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/mioverlay.c,v
retrieving revision 3.16
diff -u -3 -p -r3.16 mioverlay.c
--- mi/mioverlay.c      11 Sep 2003 05:12:51 -0000      3.16
+++ mi/mioverlay.c      12 Feb 2004 18:42:16 -0000
@@ -80,9 +80,7 @@ static void miOverlayResizeWindow(Window
                                        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 @@ miInitOverlay(
     pScreen->ResizeWindow = miOverlayResizeWindow;
     pScreen->MarkWindow = miOverlayMarkWindow;
     pScreen->ClearToBackground = miOverlayClearToBackground;
-#ifdef SHAPE
     pScreen->SetShape = miOverlaySetShape;
-#endif
     pScreen->ChangeBorderWidth = miOverlayChangeBorderWidth;
 
     return TRUE;
@@ -489,7 +485,6 @@ miOverlayComputeClips(
            break;
        case rgnPART:
            newVis = VisibilityPartiallyObscured;
-#ifdef SHAPE
            {
                RegionPtr   pBounding;
 
@@ -508,7 +503,6 @@ miOverlayComputeClips(
                    }
                }
            }
-#endif
            break;
        default:
            newVis = VisibilityFullyObscured;
@@ -1573,7 +1567,6 @@ miOverlayResizeWindow(
 }
 
 
-#ifdef SHAPE
 static void
 miOverlaySetShape(WindowPtr pWin)
 {
@@ -1661,8 +1654,6 @@ miOverlaySetShape(WindowPtr pWin)
        WindowsRestructured ();
     CheckCursorConfinement(pWin);
 }
-#endif
-
 
 
 static void
Index: mi/miscrinit.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/miscrinit.c,v
retrieving revision 3.20
diff -u -3 -p -r3.20 miscrinit.c
--- mi/miscrinit.c      2 Nov 2003 19:56:10 -0000       3.20
+++ mi/miscrinit.c      12 Feb 2004 18:42:16 -0000
@@ -306,9 +306,7 @@ miScreenInit(pScreen, pbits, xsize, ysiz
     pScreen->HandleExposures = miHandleValidateExposures;
     pScreen->ReparentWindow = (ReparentWindowProcPtr) 0;
     pScreen->ChangeBorderWidth = miChangeBorderWidth;
-#ifdef SHAPE
     pScreen->SetShape = miSetShape;
-#endif
     pScreen->MarkUnrealizedWindow = miMarkUnrealizedWindow;
 
     pScreen->SaveDoomedAreas = 0;
Index: mi/mivaltree.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/mivaltree.c,v
retrieving revision 1.15
diff -u -3 -p -r1.15 mivaltree.c
--- mi/mivaltree.c      10 Nov 2003 04:57:17 -0000      1.15
+++ mi/mivaltree.c      12 Feb 2004 18:42:16 -0000
@@ -97,7 +97,6 @@ in this Software without prior written a
 
 #include    "globals.h"
 
-#ifdef SHAPE
 /*
  * Compute the visibility of a shaped window
  */
@@ -160,7 +159,6 @@ miShapedWindowIn (pScreen, universe, bou
        return rgnIN;
     return rgnOUT;
 }
-#endif
 
 static GetRedirectBorderClipProcPtr    miGetRedirectBorderClipProc;
 static SetRedirectBorderClipProcPtr    miSetRedirectBorderClipProc;
@@ -239,7 +237,6 @@ miComputeClips (
            break;
        case rgnPART:
            newVis = VisibilityPartiallyObscured;
-#ifdef SHAPE
            {
                RegionPtr   pBounding;
 
@@ -259,7 +256,6 @@ miComputeClips (
                    }
                }
            }
-#endif
            break;
        default:
            newVis = VisibilityFullyObscured;
Index: mi/miwindow.c
===================================================================
RCS file: /cvs/xserver/xserver/mi/miwindow.c,v
retrieving revision 1.9
diff -u -3 -p -r1.9 miwindow.c
--- mi/miwindow.c       11 Sep 2003 05:12:51 -0000      1.9
+++ mi/miwindow.c       12 Feb 2004 18:42:16 -0000
@@ -966,7 +966,6 @@ miGetLayerWindow(pWin)
     return pWin->firstChild;
 }
 
-#ifdef SHAPE
 /******
  *
  * miSetShape
@@ -1070,7 +1069,6 @@ miSetShape(pWin)
        WindowsRestructured ();
     CheckCursorConfinement(pWin);
 }
-#endif
 
 /* Keeps the same inside(!) origin */
 
Index: miext/rootless/rootlessCommon.h
===================================================================
RCS file: /cvs/xserver/xserver/miext/rootless/rootlessCommon.h,v
retrieving revision 1.3
diff -u -3 -p -r1.3 rootlessCommon.h
--- miext/rootless/rootlessCommon.h     11 Sep 2003 05:12:51 -0000      1.3
+++ miext/rootless/rootlessCommon.h     12 Feb 2004 18:42:17 -0000
@@ -91,9 +91,7 @@ typedef struct _RootlessScreenRec {
     MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
     ValidateTreeProcPtr ValidateTree;
 
-#ifdef SHAPE
     SetShapeProcPtr SetShape;
-#endif
 
 #ifdef RENDER
     CompositeProcPtr Composite;
Index: miext/rootless/rootlessScreen.c
===================================================================
RCS file: /cvs/xserver/xserver/miext/rootless/rootlessScreen.c,v
retrieving revision 1.3
diff -u -3 -p -r1.3 rootlessScreen.c
--- miext/rootless/rootlessScreen.c     11 Sep 2003 05:12:51 -0000      1.3
+++ miext/rootless/rootlessScreen.c     12 Feb 2004 18:42:17 -0000
@@ -615,10 +615,7 @@ RootlessWrap(ScreenPtr pScreen)
     WRAP(MarkOverlappedWindows);
     WRAP(ValidateTree);
     WRAP(ChangeWindowAttributes);
-
-#ifdef SHAPE
     WRAP(SetShape);
-#endif
 
 #ifdef RENDER
     {
Index: miext/rootless/rootlessValTree.c
===================================================================
RCS file: /cvs/xserver/xserver/miext/rootless/rootlessValTree.c,v
retrieving revision 1.2
diff -u -3 -p -r1.2 rootlessValTree.c
--- miext/rootless/rootlessValTree.c    11 Sep 2003 05:12:51 -0000      1.2
+++ miext/rootless/rootlessValTree.c    12 Feb 2004 18:42:17 -0000
@@ -97,7 +97,6 @@ in this Software without prior written a
 
 #include    "globals.h"
 
-#ifdef SHAPE
 /*
  * Compute the visibility of a shaped window
  */
@@ -160,7 +159,6 @@ RootlessShapedWindowIn (pScreen, univers
        return rgnIN;
     return rgnOUT;
 }
-#endif
 
 #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \
                                    HasBorder(w) && \
@@ -228,7 +226,6 @@ RootlessComputeClips (pParent, pScreen, 
            break;
        case rgnPART:
            newVis = VisibilityPartiallyObscured;
-#ifdef SHAPE
            {
                RegionPtr   pBounding;
 
@@ -248,7 +245,6 @@ RootlessComputeClips (pParent, pScreen, 
                    }
                }
            }
-#endif
            break;
        default:
            newVis = VisibilityFullyObscured;
Index: miext/rootless/rootlessWindow.c
===================================================================
RCS file: /cvs/xserver/xserver/miext/rootless/rootlessWindow.c,v
retrieving revision 1.5
diff -u -3 -p -r1.5 rootlessWindow.c
--- miext/rootless/rootlessWindow.c     11 Sep 2003 05:12:51 -0000      1.5
+++ miext/rootless/rootlessWindow.c     12 Feb 2004 18:42:17 -0000
@@ -137,8 +137,6 @@ RootlessDestroyWindow(WindowPtr pWin)
 }
 
 
-#ifdef SHAPE
-
 static Bool
 RootlessGetShape(WindowPtr pWin, RegionPtr pShape)
 {
@@ -215,8 +213,6 @@ RootlessSetShape(WindowPtr pWin)
     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 @@ RootlessEnsureFrame(WindowPtr pWin)
 {
     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 @@ RootlessEnsureFrame(WindowPtr pWin)
 
     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 @@ RootlessEnsureFrame(WindowPtr pWin)
         return NULL;
     }
 
-#ifdef SHAPE
     if (pShape != NULL)
         REGION_UNINIT (pScreen, &shape);
-#endif
 
     return winRec;
 }
Index: miext/rootless/rootlessWindow.h
===================================================================
RCS file: /cvs/xserver/xserver/miext/rootless/rootlessWindow.h,v
retrieving revision 1.2
diff -u -3 -p -r1.2 rootlessWindow.h
--- miext/rootless/rootlessWindow.h     11 Sep 2003 05:12:51 -0000      1.2
+++ miext/rootless/rootlessWindow.h     12 Feb 2004 18:42:17 -0000
@@ -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);
Index: xfixes/region.c
===================================================================
RCS file: /cvs/xserver/xserver/xfixes/region.c,v
retrieving revision 1.5
diff -u -3 -p -r1.5 region.c
--- xfixes/region.c     22 Nov 2003 00:49:11 -0000      1.5
+++ xfixes/region.c     12 Feb 2004 18:42:17 -0000
@@ -31,9 +31,7 @@
 #endif
 #include <regionstr.h>
 #include <gcstruct.h>
-#ifdef SHAPE
 #include <shapeint.h>
-#endif
 
 RESTYPE            RegionResType;
 
@@ -168,20 +166,16 @@ ProcXFixesCreateRegionFromWindow (Client
     }
     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 @@ typedef     RegionPtr (*CreateDftPtr)(Window
 int
 ProcXFixesSetWindowShapeRegion (ClientPtr client)
 {
-#ifdef SHAPE
     WindowPtr      pWin;
     ScreenPtr      pScreen;
     RegionPtr      pRegion;
@@ -730,9 +723,6 @@ ProcXFixesSetWindowShapeRegion (ClientPt
     (*pScreen->SetShape) (pWin);
     SendShapeNotify (pWin, stuff->destKind);
     return (client->noClientException);
-#else
-    return BadRequest;
-#endif
 }
 
 int

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