Shape extension is built-in and mandatory.

This commit is contained in:
Adam Jackson 2008-07-24 09:00:22 -04:00
commit d6228cb22a
40 changed files with 2 additions and 201 deletions

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */