From d6228cb22aa89b90834d80d98b91862c1fc01b54 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 24 Jul 2008 09:00:22 -0400 Subject: Shape extension is built-in and mandatory. --- Xext/Makefile.am | 1 - Xext/panoramiXprocs.c | 4 ---- Xi/warpdevp.c | 2 -- dix/dispatch.c | 4 ---- dix/events.c | 16 ---------------- dix/window.c | 20 -------------------- hw/dmx/dmx.h | 2 -- hw/dmx/dmxclient.h | 2 -- hw/dmx/dmxscrinit.c | 4 ---- hw/dmx/dmxwindow.c | 8 -------- hw/dmx/dmxwindow.h | 4 ---- hw/xfree86/dixmods/extmod/modinit.c | 9 --------- hw/xfree86/dixmods/extmod/modinit.h | 2 -- hw/xfree86/loader/dixsym.c | 3 --- hw/xnest/Screen.c | 2 -- hw/xnest/Window.c | 10 ---------- hw/xnest/XNWindow.h | 4 ---- hw/xwin/win.h | 6 ------ hw/xwin/winmultiwindowshape.c | 2 -- hw/xwin/winmultiwindowwindow.c | 2 -- hw/xwin/winscrinit.c | 8 -------- hw/xwin/winwindow.c | 8 -------- include/dix.h | 2 -- include/globals.h | 4 ---- include/inputstr.h | 2 -- include/scrnintstr.h | 4 ---- include/windowstr.h | 8 -------- mi/miexpose.c | 2 -- mi/miinitext.c | 11 ++--------- mi/mioverlay.c | 8 -------- mi/miscrinit.c | 2 -- mi/mivaltree.c | 4 ---- mi/miwindow.c | 2 -- miext/rootless/rootlessCommon.h | 4 ---- miext/rootless/rootlessScreen.c | 2 -- miext/rootless/rootlessValTree.c | 4 ---- miext/rootless/rootlessWindow.c | 8 -------- miext/rootless/rootlessWindow.h | 2 -- os/utils.c | 3 --- xfixes/region.c | 8 -------- 40 files changed, 2 insertions(+), 201 deletions(-) mode change 100755 => 100644 xfixes/region.c diff --git a/Xext/Makefile.am b/Xext/Makefile.am index 37c68d7d3..3ae6013c0 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -29,7 +29,6 @@ BUILTIN_SRCS = \ # Sources always included in libXextmodule.la & libXext.la MODULE_SRCS = \ bigreq.c \ - shape.c \ sync.c \ xcmisc.c diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index 30aff7460..38199a5df 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -595,9 +595,7 @@ int PanoramiXTranslateCoords(ClientPtr 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 + @@ -605,7 +603,6 @@ int PanoramiXTranslateCoords(ClientPtr 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 @@ -615,7 +612,6 @@ int PanoramiXTranslateCoords(ClientPtr client) wBoundingShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box)) -#endif ) { rep.child = pWin->drawable.id; diff --git a/Xi/warpdevp.c b/Xi/warpdevp.c index 502cab402..c8e8d6116 100644 --- a/Xi/warpdevp.c +++ b/Xi/warpdevp.c @@ -155,10 +155,8 @@ ProcXWarpDevicePointer(ClientPtr client) else if (y >= pSprite->physLimits.y2) y = pSprite->physLimits.y2 - 1; -#if defined(SHAPE) if (pSprite->hotShape) ConfineToShape(pDev, pSprite->hotShape, &x, &y); -#endif (*newScreen->SetCursorPosition)(pDev, newScreen, x, y, TRUE); } else if (!PointerConfinedToScreen(pDev)) { diff --git a/dix/dispatch.c b/dix/dispatch.c index 8b2169076..c04443be0 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1044,9 +1044,7 @@ ProcTranslateCoords(ClientPtr 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 + @@ -1054,7 +1052,6 @@ ProcTranslateCoords(ClientPtr 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 @@ -1068,7 +1065,6 @@ ProcTranslateCoords(ClientPtr client) wInputShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box)) -#endif ) { rep.child = pWin->drawable.id; diff --git a/dix/events.c b/dix/events.c index b2444829a..c5578b097 100644 --- a/dix/events.c +++ b/dix/events.c @@ -815,7 +815,6 @@ SetCriticalEvent(int event) criticalEvents[event >> 3] |= 1 << (event & 7); } -#ifdef SHAPE void ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) { @@ -853,7 +852,6 @@ ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) *px = x; *py = y; } -#endif static void CheckPhysLimits( @@ -887,10 +885,8 @@ CheckPhysLimits( else if (new.y >= pSprite->physLimits.y2) new.y = pSprite->physLimits.y2 - 1; -#ifdef SHAPE if (pSprite->hotShape) ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y); -#endif if ((pScreen != pSprite->hotPhys.pScreen) || (new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y)) { @@ -942,11 +938,9 @@ CheckVirtualMotion( pSprite->hot.y = lims.y1; else if (pSprite->hot.y >= lims.y2) pSprite->hot.y = lims.y2 - 1; -#ifdef SHAPE if (wBoundingShape(pWin)) ConfineToShape(pDev, &pWin->borderSize, &pSprite->hot.x, &pSprite->hot.y); -#endif if (qe) { qe->pScreen = pSprite->hot.pScreen; @@ -982,10 +976,8 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bo else { pSprite->hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize); -#ifdef SHAPE pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize : NullRegion; -#endif CheckPhysLimits(pDev, pSprite->current, generateEvents, confineToScreen, pScreen); } @@ -2628,7 +2620,6 @@ XYToWindow(DeviceIntPtr pDev, 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 @@ -2639,7 +2630,6 @@ XYToWindow(DeviceIntPtr pDev, int x, int y) wInputShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box)) -#endif #ifdef ROOTLESS /* In rootless mode windows may be offscreen, even when * they're in X's stack. (E.g. if the native window system @@ -2732,10 +2722,8 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) pSprite->hot.y = pSprite->physLimits.y1; else if (pSprite->hot.y >= pSprite->physLimits.y2) pSprite->hot.y = pSprite->physLimits.y2 - 1; -#ifdef SHAPE if (pSprite->hotShape) ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y); -#endif #ifdef XEVIE xeviehot.x = pSprite->hot.x; xeviehot.y = pSprite->hot.y; @@ -2970,9 +2958,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) pSprite->hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y; pSprite->physLimits = pSprite->hotLimits; pSprite->confineWin = NullWindow; -#ifdef SHAPE pSprite->hotShape = NullRegion; -#endif pSprite->screen = pScreen; /* gotta UNINIT these someplace */ REGION_NULL(pScreen, &pSprite->Reg1); @@ -3305,10 +3291,8 @@ ProcWarpPointer(ClientPtr client) y = pSprite->physLimits.y1; else if (y >= pSprite->physLimits.y2) y = pSprite->physLimits.y2 - 1; -#if defined(SHAPE) if (pSprite->hotShape) ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y); -#endif (*newScreen->SetCursorPosition)(PickPointer(client), newScreen, x, y, TRUE); } diff --git a/dix/window.c b/dix/window.c index a780d64c7..14fccab6e 100644 --- a/dix/window.c +++ b/dix/window.c @@ -407,11 +407,9 @@ CreateRootWindow(ScreenPtr pScreen) pWin->optional->userProps = NULL; pWin->optional->backingBitPlanes = ~0L; pWin->optional->backingPixel = 0; -#ifdef SHAPE pWin->optional->boundingShape = NULL; pWin->optional->clipShape = NULL; pWin->optional->inputShape = NULL; -#endif pWin->optional->inputMasks = NULL; pWin->optional->deviceCursors = NULL; pWin->optional->geMasks = (GenericClientMasksPtr)xcalloc(1, sizeof(GenericClientMasksRec)); @@ -884,14 +882,12 @@ FreeWindowResources(WindowPtr pWin) 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)); if (wInputShape (pWin)) REGION_DESTROY(pScreen, wInputShape (pWin)); -#endif if (pWin->borderIsPixel == FALSE) (*pScreen->DestroyPixmap)(pWin->border.pixmap); if (pWin->backgroundState == BackgroundPixmap) @@ -1679,7 +1675,6 @@ CreateUnclippedWinSize (WindowPtr 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)) { ScreenPtr pScreen; pScreen = pWin->drawable.pScreen; @@ -1692,7 +1687,6 @@ CreateUnclippedWinSize (WindowPtr pWin) REGION_INTERSECT(pScreen, pRgn, pRgn, wClipShape (pWin)); REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x, pWin->drawable.y); } -#endif return pRgn; } @@ -1720,7 +1714,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)) { ScreenPtr pScreen; pScreen = pWin->drawable.pScreen; @@ -1736,7 +1729,6 @@ SetWinSize (WindowPtr pWin) REGION_TRANSLATE(pScreen, &pWin->winSize, pWin->drawable.x, pWin->drawable.y); } -#endif } _X_EXPORT void @@ -1767,7 +1759,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)) { ScreenPtr pScreen; pScreen = pWin->drawable.pScreen; @@ -1781,7 +1772,6 @@ SetBorderSize (WindowPtr pWin) REGION_UNION(pScreen, &pWin->borderSize, &pWin->borderSize, &pWin->winSize); } -#endif } else { REGION_COPY(pWin->drawable.pScreen, &pWin->borderSize, &pWin->winSize); @@ -1972,7 +1962,6 @@ WindowExtents( return(pBox); } -#ifdef SHAPE #define IS_SHAPED(pWin) (wBoundingShape (pWin) != (RegionPtr) NULL) static RegionPtr @@ -2017,7 +2006,6 @@ ShapeOverlap ( REGION_DESTROY(pScreen, pSibRgn); return ret; } -#endif static Bool AnyWindowOverlapsMe( @@ -2035,9 +2023,7 @@ AnyWindowOverlapsMe( { sbox = WindowExtents(pSib, &sboxrec); if (BOXES_OVERLAP(sbox, box) -#ifdef SHAPE && ShapeOverlap (pWin, box, pSib, sbox) -#endif ) return(TRUE); } @@ -2060,9 +2046,7 @@ IOverlapAnyWindow( { sbox = WindowExtents(pSib, &sboxrec); if (BOXES_OVERLAP(sbox, box) -#ifdef SHAPE && ShapeOverlap (pWin, box, pSib, sbox) -#endif ) return(TRUE); } @@ -3617,14 +3601,12 @@ CheckWindowOptionalNeed (WindowPtr w) return; if (optional->backingPixel != 0) return; -#ifdef SHAPE if (optional->boundingShape != NULL) return; if (optional->clipShape != NULL) return; if (optional->inputShape != NULL) return; -#endif if (optional->inputMasks != NULL) return; if (optional->deviceCursors != NULL) @@ -3681,11 +3663,9 @@ MakeWindowOptional (WindowPtr pWin) optional->userProps = NULL; optional->backingBitPlanes = ~0L; optional->backingPixel = 0; -#ifdef SHAPE optional->boundingShape = NULL; optional->clipShape = NULL; optional->inputShape = NULL; -#endif optional->inputMasks = NULL; optional->deviceCursors = NULL; diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h index 4fef91537..00200a851 100644 --- a/hw/dmx/dmx.h +++ b/hw/dmx/dmx.h @@ -231,9 +231,7 @@ typedef struct _DMXScreenInfo { InstallColormapProcPtr InstallColormap; StoreColorsProcPtr StoreColors; -#ifdef SHAPE SetShapeProcPtr SetShape; -#endif #ifdef RENDER CreatePictureProcPtr CreatePicture; diff --git a/hw/dmx/dmxclient.h b/hw/dmx/dmxclient.h index 91ba0493c..f0c3608da 100644 --- a/hw/dmx/dmxclient.h +++ b/hw/dmx/dmxclient.h @@ -84,9 +84,7 @@ typedef XID KeySym64; #include #include /* For XmuSnprintf */ -#ifdef SHAPE #include -#endif #ifdef RENDER #include diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c index 1d12ec32d..0e49e9677 100644 --- a/hw/dmx/dmxscrinit.c +++ b/hw/dmx/dmxscrinit.c @@ -340,10 +340,8 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]) DMX_WRAP(InstallColormap, dmxInstallColormap, dmxScreen, pScreen); DMX_WRAP(StoreColors, dmxStoreColors, dmxScreen, pScreen); -#ifdef SHAPE /* Wrap Shape functions */ DMX_WRAP(SetShape, dmxSetShape, dmxScreen, pScreen); -#endif } if (!dmxCreateDefColormap(pScreen)) @@ -434,10 +432,8 @@ Bool dmxCloseScreen(int idx, ScreenPtr pScreen) xfree(dmxScreen->shadow); } else { -#ifdef SHAPE /* Unwrap Shape functions */ DMX_UNWRAP(SetShape, dmxScreen, pScreen); -#endif /* Unwrap the pScreen functions */ DMX_UNWRAP(CreateGC, dmxScreen, pScreen); diff --git a/hw/dmx/dmxwindow.c b/hw/dmx/dmxwindow.c index 7494e6df2..24acc08e3 100644 --- a/hw/dmx/dmxwindow.c +++ b/hw/dmx/dmxwindow.c @@ -57,9 +57,7 @@ static void dmxDoChangeWindowAttributes(WindowPtr pWindow, unsigned long *mask, XSetWindowAttributes *attribs); -#ifdef SHAPE static void dmxDoSetShape(WindowPtr pWindow); -#endif /** Initialize the private area for the window functions. */ Bool dmxInitWindow(ScreenPtr pScreen) @@ -289,9 +287,7 @@ void dmxCreateAndRealizeWindow(WindowPtr pWindow, Bool doSync) pWinPriv->window = dmxCreateNonRootWindow(pWindow); if (pWinPriv->restacked) dmxDoRestackWindow(pWindow); -#ifdef SHAPE if (pWinPriv->isShaped) dmxDoSetShape(pWindow); -#endif #ifdef RENDER if (pWinPriv->hasPict) dmxCreatePictureList(pWindow); #endif @@ -323,9 +319,7 @@ Bool dmxCreateWindow(WindowPtr pWindow) pWinPriv->mapped = FALSE; pWinPriv->restacked = FALSE; pWinPriv->attribMask = 0; -#ifdef SHAPE pWinPriv->isShaped = FALSE; -#endif #ifdef RENDER pWinPriv->hasPict = FALSE; #endif @@ -942,7 +936,6 @@ void dmxChangeBorderWidth(WindowPtr pWindow, unsigned int width) DMX_WRAP(ChangeBorderWidth, dmxChangeBorderWidth, dmxScreen, pScreen); } -#ifdef SHAPE static void dmxDoSetShape(WindowPtr pWindow) { ScreenPtr pScreen = pWindow->drawable.pScreen; @@ -1029,4 +1022,3 @@ void dmxSetShape(WindowPtr pWindow) DMX_WRAP(SetShape, dmxSetShape, dmxScreen, pScreen); } -#endif diff --git a/hw/dmx/dmxwindow.h b/hw/dmx/dmxwindow.h index 72c76aa3b..353d0a3ba 100644 --- a/hw/dmx/dmxwindow.h +++ b/hw/dmx/dmxwindow.h @@ -48,9 +48,7 @@ typedef struct _dmxWinPriv { unsigned long attribMask; Colormap cmap; Visual *visual; -#ifdef SHAPE Bool isShaped; -#endif #ifdef RENDER Bool hasPict; #endif @@ -97,10 +95,8 @@ extern void dmxResizeRootWindow(WindowPtr pRoot, extern Bool dmxBEDestroyWindow(WindowPtr pWindow); -#ifdef SHAPE /* Support for shape extension */ extern void dmxSetShape(WindowPtr pWindow); -#endif /** Private index. \see dmxwindow.c \see dmxscrinit.c */ extern DevPrivateKey dmxWinPrivateKey; diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c index a18118a53..bfbd31c10 100644 --- a/hw/xfree86/dixmods/extmod/modinit.c +++ b/hw/xfree86/dixmods/extmod/modinit.c @@ -47,15 +47,6 @@ static ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef SHAPE - { - ShapeExtensionInit, - SHAPENAME, - &noShapeExtension, - NULL, - NULL - }, -#endif #ifdef MULTIBUFFER { MultibufferExtensionInit, diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h index fe95c4922..a376a596e 100644 --- a/hw/xfree86/dixmods/extmod/modinit.h +++ b/hw/xfree86/dixmods/extmod/modinit.h @@ -7,10 +7,8 @@ #define INITARGS void #endif -#ifdef SHAPE #define _SHAPE_SERVER_ /* don't want Xlib structures */ #include -#endif #ifdef MULTIBUFFER extern void MultibufferExtensionInit(INITARGS); diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index eb7988f64..748e8952f 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -374,9 +374,6 @@ _X_HIDDEN void *dixLookupTab[] = { #ifdef RENDER SYMVAR(noRenderExtension) #endif -#ifdef SHAPE - SYMVAR(noShapeExtension) -#endif #ifdef XCSECURITY SYMVAR(noSecurityExtension) #endif diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index 1c129e703..02294557d 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -331,10 +331,8 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) if (!miScreenDevPrivateInit(pScreen, xnestWidth, NULL)) return FALSE; -#ifdef SHAPE /* overwrite miSetShape with our own */ pScreen->SetShape = xnestSetShape; -#endif /* SHAPE */ /* devPrivates */ diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index bc9d8bed2..23383e180 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -131,12 +131,10 @@ 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); @@ -150,12 +148,10 @@ 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; @@ -362,9 +358,7 @@ Bool xnestRealizeWindow(WindowPtr pWin) { xnestConfigureWindow(pWin, CWStackingOrder); -#ifdef SHAPE xnestShapeWindow(pWin); -#endif /* SHAPE */ XMapWindow(xnestDisplay, xnestWindow(pWin)); return True; @@ -387,9 +381,7 @@ void xnestClipNotify(WindowPtr pWin, int dx, int dy) { xnestConfigureWindow(pWin, CWStackingOrder); -#ifdef SHAPE xnestShapeWindow(pWin); -#endif /* SHAPE */ } static Bool @@ -426,7 +418,6 @@ xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed) miWindowExposures(pWin, pRgn, other_exposed); } -#ifdef SHAPE void xnestSetShape(WindowPtr pWin) { @@ -529,4 +520,3 @@ xnestShapeWindow(WindowPtr pWin) } } } -#endif /* SHAPE */ diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h index 4cb66c8ce..b59d86a97 100644 --- a/hw/xnest/XNWindow.h +++ b/hw/xnest/XNWindow.h @@ -24,10 +24,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 { @@ -68,9 +66,7 @@ void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion); void xnestClipNotify(WindowPtr pWin, int dx, int dy); void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed); -#ifdef SHAPE void xnestSetShape(WindowPtr pWin); void xnestShapeWindow(WindowPtr pWin); -#endif /* SHAPE */ #endif /* XNESTWINDOW_H */ diff --git a/hw/xwin/win.h b/hw/xwin/win.h index 3ab324931..ea54b997c 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -586,9 +586,7 @@ typedef struct _winPrivScreenRec ReparentWindowProcPtr ReparentWindow; ResizeWindowProcPtr ResizeWindow; MoveWindowProcPtr MoveWindow; -#ifdef SHAPE SetShapeProcPtr SetShape; -#endif winCursorRec cursor; } winPrivScreenRec; @@ -1196,10 +1194,8 @@ winUnmapWindowRootless (WindowPtr pWindow); Bool winMapWindowRootless (WindowPtr pWindow); -#ifdef SHAPE void winSetShapeRootless (WindowPtr pWindow); -#endif /* @@ -1215,7 +1211,6 @@ winXIconToHICON (WindowPtr pWin, int iconSize); * winmultiwindowshape.c */ -# ifdef SHAPE void winReshapeMultiWindow (WindowPtr pWin); @@ -1224,7 +1219,6 @@ winSetShapeMultiWindow (WindowPtr pWindow); void winUpdateRgnMultiWindow (WindowPtr pWindow); -# endif #endif diff --git a/hw/xwin/winmultiwindowshape.c b/hw/xwin/winmultiwindowshape.c index 33deae337..62cddd0a1 100644 --- a/hw/xwin/winmultiwindowshape.c +++ b/hw/xwin/winmultiwindowshape.c @@ -32,7 +32,6 @@ #ifdef HAVE_XWIN_CONFIG_H #include #endif -#ifdef SHAPE #include "win.h" @@ -208,4 +207,3 @@ winReshapeMultiWindow (WindowPtr pWin) return; } -#endif diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index 037c881b4..75bef9786 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -352,11 +352,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; } diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index 9dc4c3da5..512109500 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -478,9 +478,7 @@ winFinishScreenInitFB (int index, WRAP(UnrealizeWindow); WRAP(PositionWindow); WRAP(ChangeWindowAttributes); -#ifdef SHAPE WRAP(SetShape); -#endif /* Assign rootless window procedures to be top level procedures */ pScreen->CreateWindow = winCreateWindowRootless; @@ -489,9 +487,7 @@ winFinishScreenInitFB (int index, /*pScreen->ChangeWindowAttributes = winChangeWindowAttributesRootless;*/ pScreen->RealizeWindow = winMapWindowRootless; pScreen->UnrealizeWindow = winUnmapWindowRootless; -#ifdef SHAPE pScreen->SetShape = winSetShapeRootless; -#endif /* Undefine the WRAP macro, as it is not needed elsewhere */ #undef WRAP @@ -523,9 +519,7 @@ winFinishScreenInitFB (int index, WRAP(ResizeWindow); WRAP(MoveWindow); WRAP(CopyWindow); -#ifdef SHAPE WRAP(SetShape); -#endif /* Assign multi-window window procedures to be top level procedures */ pScreen->CreateWindow = winCreateWindowMultiWindow; @@ -539,9 +533,7 @@ winFinishScreenInitFB (int index, pScreen->ResizeWindow = winResizeWindowMultiWindow; pScreen->MoveWindow = winMoveWindowMultiWindow; pScreen->CopyWindow = winCopyWindowMultiWindow; -#ifdef SHAPE pScreen->SetShape = winSetShapeMultiWindow; -#endif /* Undefine the WRAP macro, as it is not needed elsewhere */ #undef WRAP diff --git a/hw/xwin/winwindow.c b/hw/xwin/winwindow.c index 1600996df..285a344f7 100644 --- a/hw/xwin/winwindow.c +++ b/hw/xwin/winwindow.c @@ -46,11 +46,9 @@ static void winUpdateRgnRootless (WindowPtr pWindow); -#ifdef SHAPE static void winReshapeRootless (WindowPtr pWin); -#endif #ifdef XWIN_NATIVEGDI @@ -447,9 +445,7 @@ winMapWindowRootless (WindowPtr pWin) fResult = (*pScreen->RealizeWindow)(pWin); WIN_WRAP(RealizeWindow, winMapWindowRootless); -#ifdef SHAPE winReshapeRootless (pWin); -#endif winUpdateRgnRootless (pWin); @@ -457,7 +453,6 @@ winMapWindowRootless (WindowPtr pWin) } -#ifdef SHAPE void winSetShapeRootless (WindowPtr pWin) { @@ -478,7 +473,6 @@ winSetShapeRootless (WindowPtr pWin) return; } -#endif /* @@ -569,7 +563,6 @@ winUpdateRgnRootless (WindowPtr pWin) } -#ifdef SHAPE static void winReshapeRootless (WindowPtr pWin) @@ -646,4 +639,3 @@ winReshapeRootless (WindowPtr pWin) return; } -#endif diff --git a/include/dix.h b/include/dix.h index fcb24888b..4b8a96e57 100644 --- a/include/dix.h +++ b/include/dix.h @@ -313,13 +313,11 @@ extern void SetMaskForEvent( Mask /* mask */, int /* event */); -#ifdef SHAPE extern void ConfineToShape( DeviceIntPtr /* pDev */, RegionPtr /* shape */, int* /* px */, int* /* py */); -#endif extern Bool IsParent( WindowPtr /* maybeparent */, diff --git a/include/globals.h b/include/globals.h index d9f140ec7..ccd71b3d3 100644 --- a/include/globals.h +++ b/include/globals.h @@ -89,10 +89,6 @@ extern Bool noRRExtension; extern Bool noRenderExtension; #endif -#ifdef SHAPE -extern Bool noShapeExtension; -#endif - #ifdef XCSECURITY extern Bool noSecurityExtension; #endif diff --git a/include/inputstr.h b/include/inputstr.h index 3f5c76870..6bba47cf8 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -314,9 +314,7 @@ typedef 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 */ diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 5d4ddbbba..a309077ce 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -426,10 +426,8 @@ typedef void (* ReparentWindowProcPtr)( WindowPtr /*pWin*/, WindowPtr /*pPriorParent*/); -#ifdef SHAPE typedef void (* SetShapeProcPtr)( WindowPtr /*pWin*/); -#endif /* SHAPE */ typedef void (* ChangeBorderWidthProcPtr)( WindowPtr /*pWin*/, @@ -589,9 +587,7 @@ typedef struct _Screen { HandleExposuresProcPtr HandleExposures; ReparentWindowProcPtr ReparentWindow; -#ifdef SHAPE SetShapeProcPtr SetShape; -#endif /* SHAPE */ ChangeBorderWidthProcPtr ChangeBorderWidth; MarkUnrealizedWindowProcPtr MarkUnrealizedWindow; diff --git a/include/windowstr.h b/include/windowstr.h index 2d11f6ec7..76501c726 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -108,11 +108,9 @@ 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 */ RegionPtr inputShape; /* default: NULL */ -#endif struct _OtherInputMasks *inputMasks; /* default: NULL */ DevCursorList deviceCursors; /* default: NULL */ struct _GenericClientMasks *geMasks; /* default: NULL */ @@ -217,21 +215,15 @@ 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) #define wInputShape(w) wUseDefault(w, inputShape, 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 --git a/mi/miexpose.c b/mi/miexpose.c index b1bc0135c..7da132403 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -265,7 +265,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, extents = pGC->graphicsExposures && (REGION_NUM_RECTS(&rgnExposed) > RECTLIMIT) && (pDstDrawable->type != DRAWABLE_PIXMAP); -#ifdef SHAPE if (pSrcWin) { RegionPtr region; @@ -279,7 +278,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, (RECT_IN_REGION(pscr, region, &srcBox) != rgnIN)) extents = FALSE; } -#endif if (extents) { expBox = *REGION_EXTENTS(pscr, &rgnExposed); diff --git a/mi/miinitext.c b/mi/miinitext.c index cd0a843a4..0263ff1bc 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -116,9 +116,6 @@ extern Bool noRRExtension; #ifdef RENDER extern Bool noRenderExtension; #endif -#ifdef SHAPE -extern Bool noShapeExtension; -#endif #ifdef XCSECURITY extern Bool noSecurityExtension; #endif @@ -349,9 +346,6 @@ static ExtensionToggle ExtensionToggleList[] = #ifdef RENDER { "RENDER", &noRenderExtension }, #endif -#ifdef SHAPE - { "SHAPE", &noShapeExtension }, -#endif #ifdef XCSECURITY { "SECURITY", &noSecurityExtension }, #endif @@ -440,9 +434,7 @@ InitExtensions(int argc, char *argv[]) #ifdef INXQUARTZ if(!noPseudoramiXExtension) PseudoramiXExtensionInit(); #endif -#ifdef SHAPE - if (!noShapeExtension) ShapeExtensionInit(); -#endif + ShapeExtensionInit(); #ifdef MITSHM if (!noMITShmExtension) ShmExtensionInit(); #endif @@ -548,6 +540,7 @@ InitVisualWrap() /* List of built-in (statically linked) extensions */ static ExtensionModule staticExtensions[] = { { GEExtensionInit, "Generic Event Extension", &noGEExtension, NULL, NULL}, + { ShapeExtensionInit, "SHAPE", NULL, NULL, NULL }, #ifdef MITSHM { ShmExtensionInit, SHMNAME, &noMITShmExtension, NULL, NULL }, #endif diff --git a/mi/mioverlay.c b/mi/mioverlay.c index 6ddcc052d..77687fb0c 100644 --- a/mi/mioverlay.c +++ b/mi/mioverlay.c @@ -80,9 +80,7 @@ static void miOverlayResizeWindow(WindowPtr, int, int, unsigned int, 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) ((miOverlayScreenPtr) \ @@ -148,9 +146,7 @@ miInitOverlay( pScreen->ResizeWindow = miOverlayResizeWindow; pScreen->MarkWindow = miOverlayMarkWindow; pScreen->ClearToBackground = miOverlayClearToBackground; -#ifdef SHAPE pScreen->SetShape = miOverlaySetShape; -#endif pScreen->ChangeBorderWidth = miOverlayChangeBorderWidth; return TRUE; @@ -480,7 +476,6 @@ miOverlayComputeClips( break; case rgnPART: newVis = VisibilityPartiallyObscured; -#ifdef SHAPE { RegionPtr pBounding; @@ -499,7 +494,6 @@ miOverlayComputeClips( } } } -#endif break; default: newVis = VisibilityFullyObscured; @@ -1522,7 +1516,6 @@ miOverlayResizeWindow( } -#ifdef SHAPE static void miOverlaySetShape(WindowPtr pWin) { @@ -1584,7 +1577,6 @@ miOverlaySetShape(WindowPtr pWin) WindowsRestructured (); CheckCursorConfinement(pWin); } -#endif diff --git a/mi/miscrinit.c b/mi/miscrinit.c index 9757113a5..ee607466f 100644 --- a/mi/miscrinit.c +++ b/mi/miscrinit.c @@ -265,9 +265,7 @@ miScreenInit( pScreen->HandleExposures = miHandleValidateExposures; pScreen->ReparentWindow = (ReparentWindowProcPtr) 0; pScreen->ChangeBorderWidth = miChangeBorderWidth; -#ifdef SHAPE pScreen->SetShape = miSetShape; -#endif pScreen->MarkUnrealizedWindow = miMarkUnrealizedWindow; pScreen->SaveDoomedAreas = 0; diff --git a/mi/mivaltree.c b/mi/mivaltree.c index 9449db730..92dcffeea 100644 --- a/mi/mivaltree.c +++ b/mi/mivaltree.c @@ -103,7 +103,6 @@ Equipment Corporation. #include "globals.h" -#ifdef SHAPE /* * Compute the visibility of a shaped window */ @@ -163,7 +162,6 @@ miShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, RegionPtr bounding, return rgnIN; return rgnOUT; } -#endif static GetRedirectBorderClipProcPtr miGetRedirectBorderClipProc; static SetRedirectBorderClipProcPtr miSetRedirectBorderClipProc; @@ -269,7 +267,6 @@ miComputeClips ( break; case rgnPART: newVis = VisibilityPartiallyObscured; -#ifdef SHAPE { RegionPtr pBounding; @@ -289,7 +286,6 @@ miComputeClips ( } } } -#endif break; default: newVis = VisibilityFullyObscured; diff --git a/mi/miwindow.c b/mi/miwindow.c index 9f24c7e4c..1a8b19411 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -909,7 +909,6 @@ miGetLayerWindow(WindowPtr pWin) return pWin->firstChild; } -#ifdef SHAPE /****** * * miSetShape @@ -983,7 +982,6 @@ miSetShape(WindowPtr pWin) WindowsRestructured (); CheckCursorConfinement(pWin); } -#endif /* Keeps the same inside(!) origin */ diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h index 9e4a14a04..56f81f5d5 100644 --- a/miext/rootless/rootlessCommon.h +++ b/miext/rootless/rootlessCommon.h @@ -39,9 +39,7 @@ #include "rootless.h" #include "fb.h" -#ifdef SHAPE #include "scrnintstr.h" -#endif /* SHAPE */ #ifdef RENDER #include "picturestr.h" @@ -99,9 +97,7 @@ typedef struct _RootlessScreenRec { MarkOverlappedWindowsProcPtr MarkOverlappedWindows; ValidateTreeProcPtr ValidateTree; -#ifdef SHAPE SetShapeProcPtr SetShape; -#endif #ifdef RENDER CompositeProcPtr Composite; diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c index 5031858dd..8eaacca0b 100644 --- a/miext/rootless/rootlessScreen.c +++ b/miext/rootless/rootlessScreen.c @@ -666,9 +666,7 @@ RootlessWrap(ScreenPtr pScreen) WRAP(UninstallColormap); WRAP(StoreColors); -#ifdef SHAPE WRAP(SetShape); -#endif #ifdef RENDER { diff --git a/miext/rootless/rootlessValTree.c b/miext/rootless/rootlessValTree.c index 4f16530cc..d52a2af81 100644 --- a/miext/rootless/rootlessValTree.c +++ b/miext/rootless/rootlessValTree.c @@ -104,7 +104,6 @@ Equipment Corporation. #include "globals.h" -#ifdef SHAPE /* * Compute the visibility of a shaped window */ @@ -167,7 +166,6 @@ RootlessShapedWindowIn (pScreen, universe, bounding, rect, x, y) return rgnIN; return rgnOUT; } -#endif #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ HasBorder(w) && \ @@ -235,7 +233,6 @@ RootlessComputeClips (pParent, pScreen, universe, kind, exposed) break; case rgnPART: newVis = VisibilityPartiallyObscured; -#ifdef SHAPE { RegionPtr pBounding; @@ -255,7 +252,6 @@ RootlessComputeClips (pParent, pScreen, universe, kind, exposed) } } } -#endif break; default: newVis = VisibilityFullyObscured; diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 0edafe7ea..d863e3995 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -265,7 +265,6 @@ RootlessDestroyWindow(WindowPtr pWin) } -#ifdef SHAPE static Bool RootlessGetShape(WindowPtr pWin, RegionPtr pShape) @@ -345,7 +344,6 @@ RootlessSetShape(WindowPtr pWin) RootlessReshapeFrame(pWin); } -#endif // SHAPE /* Disallow ParentRelative background on top-level windows @@ -463,9 +461,7 @@ RootlessEnsureFrame(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; RootlessWindowRec *winRec; -#ifdef SHAPE RegionRec shape; -#endif RegionPtr pShape = NULL; if (WINREC(pWin) != NULL) @@ -491,11 +487,9 @@ RootlessEnsureFrame(WindowPtr pWin) SETWINREC(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 "); @@ -513,10 +507,8 @@ RootlessEnsureFrame(WindowPtr pWin) if (pWin->drawable.depth == 8) RootlessFlushWindowColormap(pWin); -#ifdef SHAPE if (pShape != NULL) REGION_UNINIT(pScreen, &shape); -#endif return winRec; } diff --git a/miext/rootless/rootlessWindow.h b/miext/rootless/rootlessWindow.h index 45bc4c202..2d2555ea5 100644 --- a/miext/rootless/rootlessWindow.h +++ b/miext/rootless/rootlessWindow.h @@ -39,9 +39,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 --git a/os/utils.c b/os/utils.c index 86f13f168..21203e4cc 100644 --- a/os/utils.c +++ b/os/utils.c @@ -159,9 +159,6 @@ _X_EXPORT Bool noRRExtension = FALSE; #ifdef RENDER _X_EXPORT Bool noRenderExtension = FALSE; #endif -#ifdef SHAPE -_X_EXPORT Bool noShapeExtension = FALSE; -#endif #ifdef XCSECURITY _X_EXPORT Bool noSecurityExtension = FALSE; #endif diff --git a/xfixes/region.c b/xfixes/region.c old mode 100755 new mode 100644 index d90b1e0ff..cac24b5da --- a/xfixes/region.c +++ b/xfixes/region.c @@ -169,20 +169,16 @@ ProcXFixesCreateRegionFromWindow (ClientPtr 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; @@ -678,7 +674,6 @@ typedef RegionPtr (*CreateDftPtr)(WindowPtr pWin); int ProcXFixesSetWindowShapeRegion (ClientPtr client) { -#ifdef SHAPE WindowPtr pWin; ScreenPtr pScreen; RegionPtr pRegion; @@ -753,9 +748,6 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client) (*pScreen->SetShape) (pWin); SendShapeNotify (pWin, stuff->destKind); return (client->noClientException); -#else - return BadRequest; -#endif } int -- cgit v1.2.3