Clean up after removal of screen parameters from region macros.
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
424b593c78
commit
a0fe6987b5
|
@ -620,8 +620,7 @@ int PanoramiXTranslateCoords(ClientPtr client)
|
||||||
* borderSize
|
* borderSize
|
||||||
*/
|
*/
|
||||||
&& (!wBoundingShape(pWin) ||
|
&& (!wBoundingShape(pWin) ||
|
||||||
RegionContainsPoint(
|
RegionContainsPoint(wBoundingShape(pWin),
|
||||||
wBoundingShape(pWin),
|
|
||||||
x - pWin->drawable.x,
|
x - pWin->drawable.x,
|
||||||
y - pWin->drawable.y, &box))
|
y - pWin->drawable.y, &box))
|
||||||
)
|
)
|
||||||
|
@ -1136,10 +1135,9 @@ int PanoramiXCopyArea(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pGC->graphicsExposures) {
|
if(pGC->graphicsExposures) {
|
||||||
ScreenPtr pScreen = pDst->pScreen;
|
|
||||||
Bool overlap;
|
Bool overlap;
|
||||||
RegionValidate(&totalReg, &overlap);
|
RegionValidate(&totalReg, &overlap);
|
||||||
(*pScreen->SendGraphicsExpose)(
|
(*pDst->pScreen->SendGraphicsExpose)(
|
||||||
client, &totalReg, stuff->dstDrawable, X_CopyArea, 0);
|
client, &totalReg, stuff->dstDrawable, X_CopyArea, 0);
|
||||||
RegionUninit(&totalReg);
|
RegionUninit(&totalReg);
|
||||||
}
|
}
|
||||||
|
@ -1242,10 +1240,9 @@ int PanoramiXCopyPlane(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pGC->graphicsExposures) {
|
if(pGC->graphicsExposures) {
|
||||||
ScreenPtr pScreen = pdstDraw->pScreen;
|
|
||||||
Bool overlap;
|
Bool overlap;
|
||||||
RegionValidate(&totalReg, &overlap);
|
RegionValidate(&totalReg, &overlap);
|
||||||
(*pScreen->SendGraphicsExpose)(
|
(*pdstDraw->pScreen->SendGraphicsExpose)(
|
||||||
client, &totalReg, stuff->dstDrawable, X_CopyPlane, 0);
|
client, &totalReg, stuff->dstDrawable, X_CopyPlane, 0);
|
||||||
RegionUninit(&totalReg);
|
RegionUninit(&totalReg);
|
||||||
}
|
}
|
||||||
|
|
14
Xext/shape.c
14
Xext/shape.c
|
@ -150,8 +150,6 @@ RegionOperate (
|
||||||
int xoff, int yoff,
|
int xoff, int yoff,
|
||||||
CreateDftPtr create)
|
CreateDftPtr create)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
if (srcRgn && (xoff || yoff))
|
if (srcRgn && (xoff || yoff))
|
||||||
RegionTranslate(srcRgn, xoff, yoff);
|
RegionTranslate(srcRgn, xoff, yoff);
|
||||||
if (!pWin->parent)
|
if (!pWin->parent)
|
||||||
|
@ -220,7 +218,7 @@ RegionOperate (
|
||||||
}
|
}
|
||||||
if (srcRgn)
|
if (srcRgn)
|
||||||
RegionDestroy(srcRgn);
|
RegionDestroy(srcRgn);
|
||||||
(*pScreen->SetShape) (pWin, kind);
|
(*pWin->drawable.pScreen->SetShape) (pWin, kind);
|
||||||
SendShapeNotify (pWin, kind);
|
SendShapeNotify (pWin, kind);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
@ -281,7 +279,6 @@ static int
|
||||||
ProcShapeRectangles (ClientPtr client)
|
ProcShapeRectangles (ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
ScreenPtr pScreen;
|
|
||||||
REQUEST(xShapeRectanglesReq);
|
REQUEST(xShapeRectanglesReq);
|
||||||
xRectangle *prects;
|
xRectangle *prects;
|
||||||
int nrects, ctype, rc;
|
int nrects, ctype, rc;
|
||||||
|
@ -314,7 +311,6 @@ ProcShapeRectangles (ClientPtr client)
|
||||||
client->errorValue = stuff->ordering;
|
client->errorValue = stuff->ordering;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
nrects = ((stuff->length << 2) - sizeof(xShapeRectanglesReq));
|
nrects = ((stuff->length << 2) - sizeof(xShapeRectanglesReq));
|
||||||
if (nrects & 4)
|
if (nrects & 4)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
@ -489,7 +485,6 @@ static int
|
||||||
ProcShapeCombine (ClientPtr client)
|
ProcShapeCombine (ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pSrcWin, pDestWin;
|
WindowPtr pSrcWin, pDestWin;
|
||||||
ScreenPtr pScreen;
|
|
||||||
REQUEST(xShapeCombineReq);
|
REQUEST(xShapeCombineReq);
|
||||||
RegionPtr srcRgn;
|
RegionPtr srcRgn;
|
||||||
RegionPtr *destRgn;
|
RegionPtr *destRgn;
|
||||||
|
@ -519,7 +514,6 @@ ProcShapeCombine (ClientPtr client)
|
||||||
client->errorValue = stuff->destKind;
|
client->errorValue = stuff->destKind;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
pScreen = pDestWin->drawable.pScreen;
|
|
||||||
|
|
||||||
rc = dixLookupWindow(&pSrcWin, stuff->src, client, DixGetAttrAccess);
|
rc = dixLookupWindow(&pSrcWin, stuff->src, client, DixGetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
@ -541,7 +535,7 @@ ProcShapeCombine (ClientPtr client)
|
||||||
client->errorValue = stuff->srcKind;
|
client->errorValue = stuff->srcKind;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
if (pSrcWin->drawable.pScreen != pScreen)
|
if (pSrcWin->drawable.pScreen != pDestWin->drawable.pScreen)
|
||||||
{
|
{
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
}
|
}
|
||||||
|
@ -614,7 +608,6 @@ static int
|
||||||
ProcShapeOffset (ClientPtr client)
|
ProcShapeOffset (ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
ScreenPtr pScreen;
|
|
||||||
REQUEST(xShapeOffsetReq);
|
REQUEST(xShapeOffsetReq);
|
||||||
RegionPtr srcRgn;
|
RegionPtr srcRgn;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -638,11 +631,10 @@ ProcShapeOffset (ClientPtr client)
|
||||||
client->errorValue = stuff->destKind;
|
client->errorValue = stuff->destKind;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
if (srcRgn)
|
if (srcRgn)
|
||||||
{
|
{
|
||||||
RegionTranslate(srcRgn, stuff->xOff, stuff->yOff);
|
RegionTranslate(srcRgn, stuff->xOff, stuff->yOff);
|
||||||
(*pScreen->SetShape) (pWin, stuff->destKind);
|
(*pWin->drawable.pScreen->SetShape) (pWin, stuff->destKind);
|
||||||
}
|
}
|
||||||
SendShapeNotify (pWin, (int)stuff->destKind);
|
SendShapeNotify (pWin, (int)stuff->destKind);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
@ -243,14 +243,11 @@ XaceCensorImage(
|
||||||
unsigned int format,
|
unsigned int format,
|
||||||
char *pBuf)
|
char *pBuf)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen;
|
|
||||||
RegionRec imageRegion; /* region representing x,y,w,h */
|
RegionRec imageRegion; /* region representing x,y,w,h */
|
||||||
RegionRec censorRegion; /* region to obliterate */
|
RegionRec censorRegion; /* region to obliterate */
|
||||||
BoxRec imageBox;
|
BoxRec imageBox;
|
||||||
int nRects;
|
int nRects;
|
||||||
|
|
||||||
pScreen = pDraw->pScreen;
|
|
||||||
|
|
||||||
imageBox.x1 = x;
|
imageBox.x1 = x;
|
||||||
imageBox.y1 = y;
|
imageBox.y1 = y;
|
||||||
imageBox.x2 = x + w;
|
imageBox.x2 = x + w;
|
||||||
|
|
|
@ -35,8 +35,6 @@ static RESTYPE DamageExtWinType;
|
||||||
static DevPrivateKeyRec DamageClientPrivateKeyRec;
|
static DevPrivateKeyRec DamageClientPrivateKeyRec;
|
||||||
#define DamageClientPrivateKey (&DamageClientPrivateKeyRec)
|
#define DamageClientPrivateKey (&DamageClientPrivateKeyRec)
|
||||||
|
|
||||||
#define prScreen screenInfo.screens[0]
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
DamageExtNotify (DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes)
|
DamageExtNotify (DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1179,14 +1179,12 @@ ProcTranslateCoords(ClientPtr client)
|
||||||
* borderSize
|
* borderSize
|
||||||
*/
|
*/
|
||||||
&& (!wBoundingShape(pWin) ||
|
&& (!wBoundingShape(pWin) ||
|
||||||
RegionContainsPoint(
|
RegionContainsPoint(&pWin->borderSize, x, y, &box))
|
||||||
&pWin->borderSize, x, y, &box))
|
|
||||||
|
|
||||||
&& (!wInputShape(pWin) ||
|
&& (!wInputShape(pWin) ||
|
||||||
RegionContainsPoint(
|
RegionContainsPoint(wInputShape(pWin),
|
||||||
wInputShape(pWin),
|
x - pWin->drawable.x,
|
||||||
x - pWin->drawable.x,
|
y - pWin->drawable.y, &box))
|
||||||
y - pWin->drawable.y, &box))
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rep.child = pWin->drawable.id;
|
rep.child = pWin->drawable.id;
|
||||||
|
@ -2151,8 +2149,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
|
||||||
pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw);
|
pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw);
|
||||||
if (pVisibleRegion)
|
if (pVisibleRegion)
|
||||||
{
|
{
|
||||||
RegionTranslate(pVisibleRegion,
|
RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y);
|
||||||
-pDraw->x, -pDraw->y);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
35
dix/events.c
35
dix/events.c
|
@ -887,7 +887,6 @@ CheckVirtualMotion(
|
||||||
static void
|
static void
|
||||||
ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bool confineToScreen)
|
ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bool confineToScreen)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
SpritePtr pSprite = pDev->spriteInfo->sprite;
|
||||||
|
|
||||||
if (syncEvents.playingEvents)
|
if (syncEvents.playingEvents)
|
||||||
|
@ -907,7 +906,7 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bo
|
||||||
pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize
|
pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize
|
||||||
: NullRegion;
|
: NullRegion;
|
||||||
CheckPhysLimits(pDev, pSprite->current, generateEvents,
|
CheckPhysLimits(pDev, pSprite->current, generateEvents,
|
||||||
confineToScreen, pScreen);
|
confineToScreen, pWin->drawable.pScreen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2562,11 +2561,10 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
for(i = 1; i < PanoramiXNumScreens; i++) {
|
||||||
if(RegionContainsPoint(
|
if(RegionContainsPoint(&pSprite->windows[i]->borderSize,
|
||||||
&pSprite->windows[i]->borderSize,
|
x + screenInfo.screens[0]->x - screenInfo.screens[i]->x,
|
||||||
x + screenInfo.screens[0]->x - screenInfo.screens[i]->x,
|
y + screenInfo.screens[0]->y - screenInfo.screens[i]->y,
|
||||||
y + screenInfo.screens[0]->y - screenInfo.screens[i]->y,
|
&box))
|
||||||
&box))
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2610,10 +2608,9 @@ XYToWindow(DeviceIntPtr pDev, int x, int y)
|
||||||
*/
|
*/
|
||||||
&& (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
|
&& (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
|
||||||
&& (!wInputShape(pWin) ||
|
&& (!wInputShape(pWin) ||
|
||||||
RegionContainsPoint(
|
RegionContainsPoint(wInputShape(pWin),
|
||||||
wInputShape(pWin),
|
x - pWin->drawable.x,
|
||||||
x - pWin->drawable.x,
|
y - pWin->drawable.y, &box))
|
||||||
y - pWin->drawable.y, &box))
|
|
||||||
#ifdef ROOTLESS
|
#ifdef ROOTLESS
|
||||||
/* In rootless mode windows may be offscreen, even when
|
/* In rootless mode windows may be offscreen, even when
|
||||||
* they're in X's stack. (E.g. if the native window system
|
* they're in X's stack. (E.g. if the native window system
|
||||||
|
@ -2881,9 +2878,9 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
|
||||||
pSprite->hotLimits.y2 -= yoff;
|
pSprite->hotLimits.y2 -= yoff;
|
||||||
|
|
||||||
if (RegionNotEmpty(&pSprite->Reg1))
|
if (RegionNotEmpty(&pSprite->Reg1))
|
||||||
RegionTranslate(&pSprite->Reg1, xoff, yoff);
|
RegionTranslate(&pSprite->Reg1, xoff, yoff);
|
||||||
if (RegionNotEmpty(&pSprite->Reg2))
|
if (RegionNotEmpty(&pSprite->Reg2))
|
||||||
RegionTranslate(&pSprite->Reg2, xoff, yoff);
|
RegionTranslate(&pSprite->Reg2, xoff, yoff);
|
||||||
|
|
||||||
/* FIXME: if we call ConfineCursorToWindow, must we do anything else? */
|
/* FIXME: if we call ConfineCursorToWindow, must we do anything else? */
|
||||||
if ((grab = pDev->deviceGrab.grab) && grab->confineTo) {
|
if ((grab = pDev->deviceGrab.grab) && grab->confineTo) {
|
||||||
|
@ -3151,7 +3148,6 @@ XineramaPointInWindowIsVisible(
|
||||||
int y
|
int y
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
int i, xoff, yoff;
|
int i, xoff, yoff;
|
||||||
|
|
||||||
|
@ -3167,16 +3163,14 @@ XineramaPointInWindowIsVisible(
|
||||||
|
|
||||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
for(i = 1; i < PanoramiXNumScreens; i++) {
|
||||||
pWin = inputInfo.pointer->spriteInfo->sprite->windows[i];
|
pWin = inputInfo.pointer->spriteInfo->sprite->windows[i];
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
x = xoff - screenInfo.screens[i]->x;
|
x = xoff - screenInfo.screens[i]->x;
|
||||||
y = yoff - screenInfo.screens[i]->y;
|
y = yoff - screenInfo.screens[i]->y;
|
||||||
|
|
||||||
if(RegionContainsPoint(&pWin->borderClip, x, y, &box)
|
if(RegionContainsPoint(&pWin->borderClip, x, y, &box)
|
||||||
&& (!wInputShape(pWin) ||
|
&& (!wInputShape(pWin) ||
|
||||||
RegionContainsPoint(
|
RegionContainsPoint(wInputShape(pWin),
|
||||||
wInputShape(pWin),
|
x - pWin->drawable.x,
|
||||||
x - pWin->drawable.x,
|
y - pWin->drawable.y, &box)))
|
||||||
y - pWin->drawable.y, &box)))
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3375,8 +3369,7 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(i = 1; i < PanoramiXNumScreens; i++) {
|
for(i = 1; i < PanoramiXNumScreens; i++) {
|
||||||
if(RegionNotEmpty(
|
if(RegionNotEmpty(&pDev->spriteInfo->sprite->windows[i]->borderSize))
|
||||||
&pDev->spriteInfo->sprite->windows[i]->borderSize))
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
46
dix/window.c
46
dix/window.c
|
@ -489,12 +489,8 @@ ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn,
|
||||||
int x, int y,
|
int x, int y,
|
||||||
int w, int h)
|
int w, int h)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen;
|
BoxRec box = *RegionExtents(&pWin->winSize);
|
||||||
BoxRec box;
|
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
box = *(RegionExtents(&pWin->winSize));
|
|
||||||
/* we do these calculations to avoid overflows */
|
/* we do these calculations to avoid overflows */
|
||||||
if (x > box.x1)
|
if (x > box.x1)
|
||||||
box.x1 = x;
|
box.x1 = x;
|
||||||
|
@ -1581,9 +1577,6 @@ SetWinSize (WindowPtr pWin)
|
||||||
(int)pWin->drawable.width,
|
(int)pWin->drawable.width,
|
||||||
(int)pWin->drawable.height);
|
(int)pWin->drawable.height);
|
||||||
if (wBoundingShape (pWin) || wClipShape (pWin)) {
|
if (wBoundingShape (pWin) || wClipShape (pWin)) {
|
||||||
ScreenPtr pScreen;
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
RegionTranslate(&pWin->winSize, - pWin->drawable.x,
|
RegionTranslate(&pWin->winSize, - pWin->drawable.x,
|
||||||
- pWin->drawable.y);
|
- pWin->drawable.y);
|
||||||
if (wBoundingShape (pWin))
|
if (wBoundingShape (pWin))
|
||||||
|
@ -1626,9 +1619,6 @@ SetBorderSize (WindowPtr pWin)
|
||||||
(int)(pWin->drawable.width + (bw<<1)),
|
(int)(pWin->drawable.width + (bw<<1)),
|
||||||
(int)(pWin->drawable.height + (bw<<1)));
|
(int)(pWin->drawable.height + (bw<<1)));
|
||||||
if (wBoundingShape (pWin)) {
|
if (wBoundingShape (pWin)) {
|
||||||
ScreenPtr pScreen;
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
RegionTranslate(&pWin->borderSize, - pWin->drawable.x,
|
RegionTranslate(&pWin->borderSize, - pWin->drawable.x,
|
||||||
- pWin->drawable.y);
|
- pWin->drawable.y);
|
||||||
RegionIntersect(&pWin->borderSize, &pWin->borderSize,
|
RegionIntersect(&pWin->borderSize, &pWin->borderSize,
|
||||||
|
@ -1639,8 +1629,7 @@ SetBorderSize (WindowPtr pWin)
|
||||||
&pWin->winSize);
|
&pWin->winSize);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
RegionCopy(&pWin->borderSize,
|
RegionCopy(&pWin->borderSize, &pWin->winSize);
|
||||||
&pWin->winSize);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1835,17 +1824,11 @@ MakeBoundingRegion (
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
BoxPtr pBox)
|
BoxPtr pBox)
|
||||||
{
|
{
|
||||||
RegionPtr pRgn;
|
RegionPtr pRgn = RegionCreate(pBox, 1);
|
||||||
ScreenPtr pScreen;
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
pRgn = RegionCreate(pBox, 1);
|
|
||||||
if (wBoundingShape (pWin)) {
|
if (wBoundingShape (pWin)) {
|
||||||
RegionTranslate(pRgn, -pWin->origin.x,
|
RegionTranslate(pRgn, -pWin->origin.x, -pWin->origin.y);
|
||||||
-pWin->origin.y);
|
RegionIntersect(pRgn, pRgn, wBoundingShape (pWin));
|
||||||
RegionIntersect(pRgn, pRgn, wBoundingShape (pWin));
|
RegionTranslate(pRgn, pWin->origin.x, pWin->origin.y);
|
||||||
RegionTranslate(pRgn, pWin->origin.x,
|
|
||||||
pWin->origin.y);
|
|
||||||
}
|
}
|
||||||
return pRgn;
|
return pRgn;
|
||||||
}
|
}
|
||||||
|
@ -1858,12 +1841,10 @@ ShapeOverlap (
|
||||||
BoxPtr pSibBox)
|
BoxPtr pSibBox)
|
||||||
{
|
{
|
||||||
RegionPtr pWinRgn, pSibRgn;
|
RegionPtr pWinRgn, pSibRgn;
|
||||||
ScreenPtr pScreen;
|
|
||||||
Bool ret;
|
Bool ret;
|
||||||
|
|
||||||
if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib))
|
if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
pWinRgn = MakeBoundingRegion (pWin, pWinBox);
|
pWinRgn = MakeBoundingRegion (pWin, pWinBox);
|
||||||
pSibRgn = MakeBoundingRegion (pSib, pSibBox);
|
pSibRgn = MakeBoundingRegion (pSib, pSibBox);
|
||||||
RegionIntersect(pWinRgn, pWinRgn, pSibRgn);
|
RegionIntersect(pWinRgn, pWinRgn, pSibRgn);
|
||||||
|
@ -1959,7 +1940,6 @@ WhereDoIGoInTheStack(
|
||||||
int smode)
|
int smode)
|
||||||
{
|
{
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
ScreenPtr pScreen;
|
|
||||||
WindowPtr pHead, pFirst;
|
WindowPtr pHead, pFirst;
|
||||||
|
|
||||||
if ((pWin == pWin->parent->firstChild) &&
|
if ((pWin == pWin->parent->firstChild) &&
|
||||||
|
@ -1967,7 +1947,6 @@ WhereDoIGoInTheStack(
|
||||||
return((WindowPtr ) NULL);
|
return((WindowPtr ) NULL);
|
||||||
pHead = RealChildHead(pWin->parent);
|
pHead = RealChildHead(pWin->parent);
|
||||||
pFirst = pHead ? pHead->nextSib : pWin->parent->firstChild;
|
pFirst = pHead ? pHead->nextSib : pWin->parent->firstChild;
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
box.x1 = x;
|
box.x1 = x;
|
||||||
box.y1 = y;
|
box.y1 = y;
|
||||||
box.x2 = x + (int)w;
|
box.x2 = x + (int)w;
|
||||||
|
@ -3011,10 +2990,9 @@ PointInWindowIsVisible(WindowPtr pWin, int x, int y)
|
||||||
if (RegionContainsPoint(&pWin->borderClip,
|
if (RegionContainsPoint(&pWin->borderClip,
|
||||||
x, y, &box)
|
x, y, &box)
|
||||||
&& (!wInputShape(pWin) ||
|
&& (!wInputShape(pWin) ||
|
||||||
RegionContainsPoint(
|
RegionContainsPoint(wInputShape(pWin),
|
||||||
wInputShape(pWin),
|
x - pWin->drawable.x,
|
||||||
x - pWin->drawable.x,
|
y - pWin->drawable.y, &box)))
|
||||||
y - pWin->drawable.y, &box)))
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
@ -3023,11 +3001,7 @@ PointInWindowIsVisible(WindowPtr pWin, int x, int y)
|
||||||
RegionPtr
|
RegionPtr
|
||||||
NotClippedByChildren(WindowPtr pWin)
|
NotClippedByChildren(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen;
|
RegionPtr pReg = RegionCreate(NullBox, 1);
|
||||||
RegionPtr pReg;
|
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
pReg = RegionCreate(NullBox, 1);
|
|
||||||
if (pWin->parent ||
|
if (pWin->parent ||
|
||||||
screenIsSaved != SCREEN_SAVER_ON ||
|
screenIsSaved != SCREEN_SAVER_ON ||
|
||||||
!HasSaverWindow (pWin->drawable.pScreen))
|
!HasSaverWindow (pWin->drawable.pScreen))
|
||||||
|
|
3
fb/fb.h
3
fb/fb.h
|
@ -744,8 +744,7 @@ typedef struct {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define fbWindowEnabled(pWin) \
|
#define fbWindowEnabled(pWin) \
|
||||||
RegionNotEmpty(\
|
RegionNotEmpty(&(pWin)->drawable.pScreen->root->borderClip)
|
||||||
&(pWin)->drawable.pScreen->root->borderClip)
|
|
||||||
|
|
||||||
#define fbDrawableEnabled(pDrawable) \
|
#define fbDrawableEnabled(pDrawable) \
|
||||||
((pDrawable)->type == DRAWABLE_PIXMAP ? \
|
((pDrawable)->type == DRAWABLE_PIXMAP ? \
|
||||||
|
|
|
@ -29,8 +29,6 @@
|
||||||
#include <X11/fonts/fontstruct.h>
|
#include <X11/fonts/fontstruct.h>
|
||||||
#include "dixfontstr.h"
|
#include "dixfontstr.h"
|
||||||
|
|
||||||
#define dummyScreen screenInfo.screens[0]
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
fbGlyphIn (RegionPtr pRegion,
|
fbGlyphIn (RegionPtr pRegion,
|
||||||
int x,
|
int x,
|
||||||
|
|
|
@ -75,8 +75,7 @@ fbOverlayCreateWindow(WindowPtr pWin)
|
||||||
*/
|
*/
|
||||||
if (!pWin->parent)
|
if (!pWin->parent)
|
||||||
{
|
{
|
||||||
RegionEmpty(
|
RegionEmpty(&pScrPriv->layer[i].u.run.region);
|
||||||
&pScrPriv->layer[i].u.run.region);
|
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -182,30 +181,25 @@ fbOverlayUpdateLayerRegion (ScreenPtr pScreen,
|
||||||
if (i == layer)
|
if (i == layer)
|
||||||
{
|
{
|
||||||
/* add new piece to this fb */
|
/* add new piece to this fb */
|
||||||
RegionUnion(
|
RegionUnion(&pScrPriv->layer[i].u.run.region,
|
||||||
&pScrPriv->layer[i].u.run.region,
|
&pScrPriv->layer[i].u.run.region,
|
||||||
&pScrPriv->layer[i].u.run.region,
|
prgn);
|
||||||
prgn);
|
|
||||||
}
|
}
|
||||||
else if (RegionNotEmpty(
|
else if (RegionNotEmpty(&pScrPriv->layer[i].u.run.region))
|
||||||
&pScrPriv->layer[i].u.run.region))
|
|
||||||
{
|
{
|
||||||
/* paint new piece with chroma key */
|
/* paint new piece with chroma key */
|
||||||
RegionNull(&rgnNew);
|
RegionNull(&rgnNew);
|
||||||
RegionIntersect(
|
RegionIntersect(&rgnNew, prgn,
|
||||||
&rgnNew,
|
&pScrPriv->layer[i].u.run.region);
|
||||||
prgn,
|
|
||||||
&pScrPriv->layer[i].u.run.region);
|
|
||||||
(*pScrPriv->PaintKey) (&pScrPriv->layer[i].u.run.pixmap->drawable,
|
(*pScrPriv->PaintKey) (&pScrPriv->layer[i].u.run.pixmap->drawable,
|
||||||
&rgnNew,
|
&rgnNew,
|
||||||
pScrPriv->layer[i].key,
|
pScrPriv->layer[i].key,
|
||||||
i);
|
i);
|
||||||
RegionUninit(&rgnNew);
|
RegionUninit(&rgnNew);
|
||||||
/* remove piece from other fbs */
|
/* remove piece from other fbs */
|
||||||
RegionSubtract(
|
RegionSubtract(&pScrPriv->layer[i].u.run.region,
|
||||||
&pScrPriv->layer[i].u.run.region,
|
&pScrPriv->layer[i].u.run.region,
|
||||||
&pScrPriv->layer[i].u.run.region,
|
prgn);
|
||||||
prgn);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -219,7 +213,7 @@ fbOverlayCopyWindow(WindowPtr pWin,
|
||||||
RegionPtr prgnSrc)
|
RegionPtr prgnSrc)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pWin->drawable.pScreen);
|
FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen);
|
||||||
RegionRec rgnDst;
|
RegionRec rgnDst;
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -189,8 +189,7 @@ Bool dmxDestroyPixmap(PixmapPtr pPixmap)
|
||||||
* pPixmap. */
|
* pPixmap. */
|
||||||
RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap)
|
RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
DMXScreenInfo *dmxScreen = &dmxScreens[pPixmap->drawable.pScreen->myNum];
|
||||||
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
|
|
||||||
dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
|
dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
|
||||||
XImage *ximage;
|
XImage *ximage;
|
||||||
RegionPtr pReg, pTmpReg;
|
RegionPtr pReg, pTmpReg;
|
||||||
|
|
|
@ -641,14 +641,12 @@ xf86XVUpdateCompositeClip(XvPortRecPrivatePtr portPriv)
|
||||||
{
|
{
|
||||||
RegionPtr pregWin, pCompositeClip;
|
RegionPtr pregWin, pCompositeClip;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
ScreenPtr pScreen;
|
|
||||||
Bool freeCompClip = FALSE;
|
Bool freeCompClip = FALSE;
|
||||||
|
|
||||||
if(portPriv->pCompositeClip)
|
if(portPriv->pCompositeClip)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pWin = (WindowPtr)portPriv->pDraw;
|
pWin = (WindowPtr)portPriv->pDraw;
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
/* get window clip list */
|
/* get window clip list */
|
||||||
if(portPriv->subWindowMode == IncludeInferiors) {
|
if(portPriv->subWindowMode == IncludeInferiors) {
|
||||||
|
@ -714,11 +712,9 @@ xf86XVRegetVideo(XvPortRecPrivatePtr portPriv)
|
||||||
RegionRec WinRegion;
|
RegionRec WinRegion;
|
||||||
RegionRec ClipRegion;
|
RegionRec ClipRegion;
|
||||||
BoxRec WinBox;
|
BoxRec WinBox;
|
||||||
ScreenPtr pScreen;
|
|
||||||
int ret = Success;
|
int ret = Success;
|
||||||
Bool clippedAway = FALSE;
|
Bool clippedAway = FALSE;
|
||||||
|
|
||||||
pScreen = portPriv->pDraw->pScreen;
|
|
||||||
xf86XVUpdateCompositeClip(portPriv);
|
xf86XVUpdateCompositeClip(portPriv);
|
||||||
|
|
||||||
/* translate the video region to the screen */
|
/* translate the video region to the screen */
|
||||||
|
@ -778,12 +774,9 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv)
|
||||||
RegionRec WinRegion;
|
RegionRec WinRegion;
|
||||||
RegionRec ClipRegion;
|
RegionRec ClipRegion;
|
||||||
BoxRec WinBox;
|
BoxRec WinBox;
|
||||||
ScreenPtr pScreen;
|
|
||||||
int ret = Success;
|
int ret = Success;
|
||||||
Bool clippedAway = FALSE;
|
Bool clippedAway = FALSE;
|
||||||
|
|
||||||
pScreen = portPriv->pDraw->pScreen;
|
|
||||||
|
|
||||||
xf86XVUpdateCompositeClip(portPriv);
|
xf86XVUpdateCompositeClip(portPriv);
|
||||||
|
|
||||||
/* translate the video region to the screen */
|
/* translate the video region to the screen */
|
||||||
|
@ -868,12 +861,9 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv)
|
||||||
RegionRec WinRegion;
|
RegionRec WinRegion;
|
||||||
RegionRec ClipRegion;
|
RegionRec ClipRegion;
|
||||||
BoxRec WinBox;
|
BoxRec WinBox;
|
||||||
ScreenPtr pScreen;
|
|
||||||
int ret = Success;
|
int ret = Success;
|
||||||
Bool clippedAway = FALSE;
|
Bool clippedAway = FALSE;
|
||||||
|
|
||||||
pScreen = portPriv->pDraw->pScreen;
|
|
||||||
|
|
||||||
xf86XVUpdateCompositeClip(portPriv);
|
xf86XVUpdateCompositeClip(portPriv);
|
||||||
|
|
||||||
/* translate the video region to the screen */
|
/* translate the video region to the screen */
|
||||||
|
@ -1418,7 +1408,6 @@ xf86XVPutStill(
|
||||||
CARD16 drw_w, CARD16 drw_h
|
CARD16 drw_w, CARD16 drw_h
|
||||||
){
|
){
|
||||||
XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr);
|
XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr);
|
||||||
ScreenPtr pScreen;
|
|
||||||
RegionRec WinRegion;
|
RegionRec WinRegion;
|
||||||
RegionRec ClipRegion;
|
RegionRec ClipRegion;
|
||||||
BoxRec WinBox;
|
BoxRec WinBox;
|
||||||
|
@ -1430,8 +1419,6 @@ xf86XVPutStill(
|
||||||
|
|
||||||
if(!portPriv->pScrn->vtSema) return Success; /* Success ? */
|
if(!portPriv->pScrn->vtSema) return Success; /* Success ? */
|
||||||
|
|
||||||
pScreen = pDraw->pScreen;
|
|
||||||
|
|
||||||
WinBox.x1 = pDraw->x + drw_x;
|
WinBox.x1 = pDraw->x + drw_x;
|
||||||
WinBox.y1 = pDraw->y + drw_y;
|
WinBox.y1 = pDraw->y + drw_y;
|
||||||
WinBox.x2 = WinBox.x1 + drw_w;
|
WinBox.x2 = WinBox.x1 + drw_w;
|
||||||
|
@ -1570,7 +1557,6 @@ xf86XVGetStill(
|
||||||
CARD16 drw_w, CARD16 drw_h
|
CARD16 drw_w, CARD16 drw_h
|
||||||
){
|
){
|
||||||
XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr);
|
XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr);
|
||||||
ScreenPtr pScreen;
|
|
||||||
RegionRec WinRegion;
|
RegionRec WinRegion;
|
||||||
RegionRec ClipRegion;
|
RegionRec ClipRegion;
|
||||||
BoxRec WinBox;
|
BoxRec WinBox;
|
||||||
|
@ -1582,8 +1568,6 @@ xf86XVGetStill(
|
||||||
|
|
||||||
if(!portPriv->pScrn->vtSema) return Success; /* Success ? */
|
if(!portPriv->pScrn->vtSema) return Success; /* Success ? */
|
||||||
|
|
||||||
pScreen = pDraw->pScreen;
|
|
||||||
|
|
||||||
WinBox.x1 = pDraw->x + drw_x;
|
WinBox.x1 = pDraw->x + drw_x;
|
||||||
WinBox.y1 = pDraw->y + drw_y;
|
WinBox.y1 = pDraw->y + drw_y;
|
||||||
WinBox.x2 = WinBox.x1 + drw_w;
|
WinBox.x2 = WinBox.x1 + drw_w;
|
||||||
|
@ -1718,7 +1702,6 @@ xf86XVPutImage(
|
||||||
CARD16 width, CARD16 height
|
CARD16 width, CARD16 height
|
||||||
){
|
){
|
||||||
XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr);
|
XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr);
|
||||||
ScreenPtr pScreen;
|
|
||||||
RegionRec WinRegion;
|
RegionRec WinRegion;
|
||||||
RegionRec ClipRegion;
|
RegionRec ClipRegion;
|
||||||
BoxRec WinBox;
|
BoxRec WinBox;
|
||||||
|
@ -1730,8 +1713,6 @@ xf86XVPutImage(
|
||||||
|
|
||||||
if(!portPriv->pScrn->vtSema) return Success; /* Success ? */
|
if(!portPriv->pScrn->vtSema) return Success; /* Success ? */
|
||||||
|
|
||||||
pScreen = pDraw->pScreen;
|
|
||||||
|
|
||||||
WinBox.x1 = pDraw->x + drw_x;
|
WinBox.x1 = pDraw->x + drw_x;
|
||||||
WinBox.y1 = pDraw->y + drw_y;
|
WinBox.y1 = pDraw->y + drw_y;
|
||||||
WinBox.x2 = WinBox.x1 + drw_w;
|
WinBox.x2 = WinBox.x1 + drw_w;
|
||||||
|
@ -1926,8 +1907,6 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
|
||||||
boundaries in 16.16 fixed point.
|
boundaries in 16.16 fixed point.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DummyScreen screenInfo.screens[0]
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
xf86XVClipVideoHelper(
|
xf86XVClipVideoHelper(
|
||||||
BoxPtr dst,
|
BoxPtr dst,
|
||||||
|
|
|
@ -1356,38 +1356,32 @@ ShadowFontToBox(BoxPtr BB, DrawablePtr pDrawable, GCPtr pGC, int x, int y,
|
||||||
}
|
}
|
||||||
right += pFont->info.maxbounds.rightSideBearing;
|
right += pFont->info.maxbounds.rightSideBearing;
|
||||||
BB->x1 =
|
BB->x1 =
|
||||||
max(pDrawable->x + x - left, (RegionExtents(
|
max(pDrawable->x + x - left,
|
||||||
&((WindowPtr) pDrawable)->winSize))->x1);
|
RegionExtents(&((WindowPtr) pDrawable)->winSize)->x1);
|
||||||
BB->y1 =
|
BB->y1 =
|
||||||
max(pDrawable->y + y - ascent,
|
max(pDrawable->y + y - ascent,
|
||||||
(RegionExtents(
|
RegionExtents(&((WindowPtr) pDrawable)->winSize)->y1);
|
||||||
&((WindowPtr) pDrawable)->winSize))->y1);
|
|
||||||
BB->x2 =
|
BB->x2 =
|
||||||
min(pDrawable->x + x + right,
|
min(pDrawable->x + x + right,
|
||||||
(RegionExtents(
|
RegionExtents(&((WindowPtr) pDrawable)->winSize)->x2);
|
||||||
&((WindowPtr) pDrawable)->winSize))->x2);
|
|
||||||
BB->y2 =
|
BB->y2 =
|
||||||
min(pDrawable->y + y + descent,
|
min(pDrawable->y + y + descent,
|
||||||
(RegionExtents(
|
RegionExtents(&((WindowPtr) pDrawable)->winSize)->y2);
|
||||||
&((WindowPtr) pDrawable)->winSize))->y2);
|
|
||||||
} else {
|
} else {
|
||||||
ShadowTextExtent(pFont, count, chars, wide ? (FONTLASTROW(pFont) == 0)
|
ShadowTextExtent(pFont, count, chars, wide ? (FONTLASTROW(pFont) == 0)
|
||||||
? Linear16Bit : TwoD16Bit : Linear8Bit, BB);
|
? Linear16Bit : TwoD16Bit : Linear8Bit, BB);
|
||||||
BB->x1 =
|
BB->x1 =
|
||||||
max(pDrawable->x + x + BB->x1, (RegionExtents(
|
max(pDrawable->x + x + BB->x1,
|
||||||
&((WindowPtr) pDrawable)->winSize))->x1);
|
RegionExtents(&((WindowPtr) pDrawable)->winSize)->x1);
|
||||||
BB->y1 =
|
BB->y1 =
|
||||||
max(pDrawable->y + y + BB->y1,
|
max(pDrawable->y + y + BB->y1,
|
||||||
(RegionExtents(
|
RegionExtents(&((WindowPtr) pDrawable)->winSize)->y1);
|
||||||
&((WindowPtr) pDrawable)->winSize))->y1);
|
|
||||||
BB->x2 =
|
BB->x2 =
|
||||||
min(pDrawable->x + x + BB->x2,
|
min(pDrawable->x + x + BB->x2,
|
||||||
(RegionExtents(
|
RegionExtents(&((WindowPtr) pDrawable)->winSize)->x2);
|
||||||
&((WindowPtr) pDrawable)->winSize))->x2);
|
|
||||||
BB->y2 =
|
BB->y2 =
|
||||||
min(pDrawable->y + y + BB->y2,
|
min(pDrawable->y + y + BB->y2,
|
||||||
(RegionExtents(
|
RegionExtents(&((WindowPtr) pDrawable)->winSize)->y2);
|
||||||
&((WindowPtr) pDrawable)->winSize))->y2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,10 +150,8 @@ xnestDestroyWindow(WindowPtr pWin)
|
||||||
if (pWin->nextSib)
|
if (pWin->nextSib)
|
||||||
xnestWindowPriv(pWin->nextSib)->sibling_above =
|
xnestWindowPriv(pWin->nextSib)->sibling_above =
|
||||||
xnestWindowPriv(pWin)->sibling_above;
|
xnestWindowPriv(pWin)->sibling_above;
|
||||||
RegionDestroy(
|
RegionDestroy(xnestWindowPriv(pWin)->bounding_shape);
|
||||||
xnestWindowPriv(pWin)->bounding_shape);
|
RegionDestroy(xnestWindowPriv(pWin)->clip_shape);
|
||||||
RegionDestroy(
|
|
||||||
xnestWindowPriv(pWin)->clip_shape);
|
|
||||||
XDestroyWindow(xnestDisplay, xnestWindow(pWin));
|
XDestroyWindow(xnestDisplay, xnestWindow(pWin));
|
||||||
xnestWindowPriv(pWin)->window = None;
|
xnestWindowPriv(pWin)->window = None;
|
||||||
|
|
||||||
|
@ -465,8 +463,7 @@ xnestShapeWindow(WindowPtr pWin)
|
||||||
wBoundingShape(pWin))) {
|
wBoundingShape(pWin))) {
|
||||||
|
|
||||||
if (wBoundingShape(pWin)) {
|
if (wBoundingShape(pWin)) {
|
||||||
RegionCopy(
|
RegionCopy(xnestWindowPriv(pWin)->bounding_shape, wBoundingShape(pWin));
|
||||||
xnestWindowPriv(pWin)->bounding_shape, wBoundingShape(pWin));
|
|
||||||
|
|
||||||
reg = XCreateRegion();
|
reg = XCreateRegion();
|
||||||
pBox = RegionRects(xnestWindowPriv(pWin)->bounding_shape);
|
pBox = RegionRects(xnestWindowPriv(pWin)->bounding_shape);
|
||||||
|
@ -484,8 +481,7 @@ xnestShapeWindow(WindowPtr pWin)
|
||||||
XDestroyRegion(reg);
|
XDestroyRegion(reg);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RegionEmpty(
|
RegionEmpty(xnestWindowPriv(pWin)->bounding_shape);
|
||||||
xnestWindowPriv(pWin)->bounding_shape);
|
|
||||||
|
|
||||||
XShapeCombineMask(xnestDisplay, xnestWindow(pWin),
|
XShapeCombineMask(xnestDisplay, xnestWindow(pWin),
|
||||||
ShapeBounding, 0, 0, None, ShapeSet);
|
ShapeBounding, 0, 0, None, ShapeSet);
|
||||||
|
@ -496,8 +492,7 @@ xnestShapeWindow(WindowPtr pWin)
|
||||||
wClipShape(pWin))) {
|
wClipShape(pWin))) {
|
||||||
|
|
||||||
if (wClipShape(pWin)) {
|
if (wClipShape(pWin)) {
|
||||||
RegionCopy(
|
RegionCopy(xnestWindowPriv(pWin)->clip_shape, wClipShape(pWin));
|
||||||
xnestWindowPriv(pWin)->clip_shape, wClipShape(pWin));
|
|
||||||
|
|
||||||
reg = XCreateRegion();
|
reg = XCreateRegion();
|
||||||
pBox = RegionRects(xnestWindowPriv(pWin)->clip_shape);
|
pBox = RegionRects(xnestWindowPriv(pWin)->clip_shape);
|
||||||
|
@ -515,8 +510,7 @@ xnestShapeWindow(WindowPtr pWin)
|
||||||
XDestroyRegion(reg);
|
XDestroyRegion(reg);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RegionEmpty(
|
RegionEmpty(xnestWindowPriv(pWin)->clip_shape);
|
||||||
xnestWindowPriv(pWin)->clip_shape);
|
|
||||||
|
|
||||||
XShapeCombineMask(xnestDisplay, xnestWindow(pWin),
|
XShapeCombineMask(xnestDisplay, xnestWindow(pWin),
|
||||||
ShapeClip, 0, 0, None, ShapeSet);
|
ShapeClip, 0, 0, None, ShapeSet);
|
||||||
|
|
|
@ -119,10 +119,7 @@ winReshapeMultiWindow (WindowPtr pWin)
|
||||||
|
|
||||||
RegionNull(&rrNewShape);
|
RegionNull(&rrNewShape);
|
||||||
RegionCopy(&rrNewShape, wBoundingShape(pWin));
|
RegionCopy(&rrNewShape, wBoundingShape(pWin));
|
||||||
RegionTranslate(
|
RegionTranslate(&rrNewShape, pWin->borderWidth, pWin->borderWidth);
|
||||||
&rrNewShape,
|
|
||||||
pWin->borderWidth,
|
|
||||||
pWin->borderWidth);
|
|
||||||
|
|
||||||
nRects = RegionNumRects(&rrNewShape);
|
nRects = RegionNumRects(&rrNewShape);
|
||||||
pShape = RegionRects(&rrNewShape);
|
pShape = RegionRects(&rrNewShape);
|
||||||
|
|
|
@ -564,7 +564,6 @@ void
|
||||||
winReshapeRootless (WindowPtr pWin)
|
winReshapeRootless (WindowPtr pWin)
|
||||||
{
|
{
|
||||||
int nRects;
|
int nRects;
|
||||||
/* ScreenPtr pScreen = pWin->drawable.pScreen;*/
|
|
||||||
RegionRec rrNewShape;
|
RegionRec rrNewShape;
|
||||||
BoxPtr pShape, pRects, pEnd;
|
BoxPtr pShape, pRects, pEnd;
|
||||||
HRGN hRgn, hRgnRect;
|
HRGN hRgn, hRgnRect;
|
||||||
|
|
|
@ -425,7 +425,6 @@ ProcWindowsWMFrameDraw (register ClientPtr client)
|
||||||
RECT rcNew;
|
RECT rcNew;
|
||||||
int nCmdShow, rc;
|
int nCmdShow, rc;
|
||||||
RegionRec newShape;
|
RegionRec newShape;
|
||||||
ScreenPtr pScreen;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xWindowsWMFrameDrawReq);
|
REQUEST_SIZE_MATCH (xWindowsWMFrameDrawReq);
|
||||||
|
|
||||||
|
@ -491,7 +490,6 @@ ProcWindowsWMFrameDraw (register ClientPtr client)
|
||||||
|
|
||||||
if (wBoundingShape(pWin) != NULL)
|
if (wBoundingShape(pWin) != NULL)
|
||||||
{
|
{
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
/* wBoundingShape is relative to *inner* origin of window.
|
/* wBoundingShape is relative to *inner* origin of window.
|
||||||
Translate by borderWidth to get the outside-relative position. */
|
Translate by borderWidth to get the outside-relative position. */
|
||||||
|
|
||||||
|
|
1
mi/mi.h
1
mi/mi.h
|
@ -463,7 +463,6 @@ extern _X_EXPORT DevPrivateKey miAllocateGCPrivateIndex(
|
||||||
/* mivaltree.c */
|
/* mivaltree.c */
|
||||||
|
|
||||||
extern _X_EXPORT int miShapedWindowIn(
|
extern _X_EXPORT int miShapedWindowIn(
|
||||||
ScreenPtr /*pScreen*/,
|
|
||||||
RegionPtr /*universe*/,
|
RegionPtr /*universe*/,
|
||||||
RegionPtr /*bounding*/,
|
RegionPtr /*bounding*/,
|
||||||
BoxPtr /*rect*/,
|
BoxPtr /*rect*/,
|
||||||
|
|
|
@ -209,8 +209,7 @@ miDoCopy (DrawablePtr pSrcDrawable,
|
||||||
* VT is inactive, make sure the region isn't empty
|
* VT is inactive, make sure the region isn't empty
|
||||||
*/
|
*/
|
||||||
if (!((WindowPtr) pSrcDrawable)->parent &&
|
if (!((WindowPtr) pSrcDrawable)->parent &&
|
||||||
RegionNotEmpty(
|
RegionNotEmpty(&((WindowPtr) pSrcDrawable)->borderClip))
|
||||||
&((WindowPtr) pSrcDrawable)->borderClip))
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* special case bitblt from root window in
|
* special case bitblt from root window in
|
||||||
|
|
|
@ -131,7 +131,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
|
||||||
GCPtr pGC, int srcx, int srcy, int width, int height,
|
GCPtr pGC, int srcx, int srcy, int width, int height,
|
||||||
int dstx, int dsty, unsigned long plane)
|
int dstx, int dsty, unsigned long plane)
|
||||||
{
|
{
|
||||||
ScreenPtr pscr;
|
|
||||||
RegionPtr prgnSrcClip; /* drawable-relative source clip */
|
RegionPtr prgnSrcClip; /* drawable-relative source clip */
|
||||||
RegionRec rgnSrcRec;
|
RegionRec rgnSrcRec;
|
||||||
RegionPtr prgnDstClip; /* drawable-relative dest clip */
|
RegionPtr prgnDstClip; /* drawable-relative dest clip */
|
||||||
|
@ -148,9 +147,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
|
||||||
BoxRec expBox;
|
BoxRec expBox;
|
||||||
Bool extents;
|
Bool extents;
|
||||||
|
|
||||||
/* This prevents warning about pscr not being used. */
|
|
||||||
pGC->pScreen = pscr = pGC->pScreen;
|
|
||||||
|
|
||||||
/* avoid work if we can */
|
/* avoid work if we can */
|
||||||
if (!pGC->graphicsExposures &&
|
if (!pGC->graphicsExposures &&
|
||||||
(pDstDrawable->type == DRAWABLE_PIXMAP) &&
|
(pDstDrawable->type == DRAWABLE_PIXMAP) &&
|
||||||
|
|
|
@ -117,8 +117,7 @@ miCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
|
||||||
break;
|
break;
|
||||||
case CT_REGION:
|
case CT_REGION:
|
||||||
prgnNew = RegionCreate(NULL, 1);
|
prgnNew = RegionCreate(NULL, 1);
|
||||||
RegionCopy(prgnNew,
|
RegionCopy(prgnNew, (RegionPtr) (pgcSrc->clientClip));
|
||||||
(RegionPtr) (pgcSrc->clientClip));
|
|
||||||
(*pgcDst->funcs->ChangeClip) (pgcDst, CT_REGION, (pointer) prgnNew, 0);
|
(*pgcDst->funcs->ChangeClip) (pgcDst, CT_REGION, (pointer) prgnNew, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -134,11 +133,6 @@ miCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst)
|
||||||
void
|
void
|
||||||
miComputeCompositeClip( GCPtr pGC, DrawablePtr pDrawable)
|
miComputeCompositeClip( GCPtr pGC, DrawablePtr pDrawable)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen;
|
|
||||||
|
|
||||||
/* This prevents warnings about pScreen not being used. */
|
|
||||||
pGC->pScreen = pScreen = pGC->pScreen;
|
|
||||||
|
|
||||||
if (pDrawable->type == DRAWABLE_WINDOW)
|
if (pDrawable->type == DRAWABLE_WINDOW)
|
||||||
{
|
{
|
||||||
WindowPtr pWin = (WindowPtr) pDrawable;
|
WindowPtr pWin = (WindowPtr) pDrawable;
|
||||||
|
|
|
@ -329,7 +329,6 @@ miOverlayMarkOverlappedWindows(
|
||||||
WindowPtr pFirst,
|
WindowPtr pFirst,
|
||||||
WindowPtr *pLayerWin
|
WindowPtr *pLayerWin
|
||||||
){
|
){
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
WindowPtr pChild, pLast;
|
WindowPtr pChild, pLast;
|
||||||
Bool overMarked, underMarked, doUnderlay, markAll;
|
Bool overMarked, underMarked, doUnderlay, markAll;
|
||||||
miOverlayTreePtr pTree = NULL, tLast, tChild;
|
miOverlayTreePtr pTree = NULL, tLast, tChild;
|
||||||
|
@ -440,6 +439,7 @@ miOverlayMarkOverlappedWindows(
|
||||||
}
|
}
|
||||||
|
|
||||||
if(underMarked) {
|
if(underMarked) {
|
||||||
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
MARK_UNDERLAY(pTree->parent->pWin);
|
MARK_UNDERLAY(pTree->parent->pWin);
|
||||||
MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->underlayMarked = TRUE;
|
MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->underlayMarked = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -486,7 +486,7 @@ miOverlayComputeClips(
|
||||||
RegionPtr pBounding;
|
RegionPtr pBounding;
|
||||||
|
|
||||||
if ((pBounding = wBoundingShape (pParent))) {
|
if ((pBounding = wBoundingShape (pParent))) {
|
||||||
switch (miShapedWindowIn (pScreen, universe, pBounding,
|
switch (miShapedWindowIn (universe, pBounding,
|
||||||
&borderSize,
|
&borderSize,
|
||||||
pParent->drawable.x,
|
pParent->drawable.x,
|
||||||
pParent->drawable.y))
|
pParent->drawable.y))
|
||||||
|
@ -535,10 +535,9 @@ miOverlayComputeClips(
|
||||||
if (tChild->valdata) {
|
if (tChild->valdata) {
|
||||||
RegionNull(&tChild->valdata->borderExposed);
|
RegionNull(&tChild->valdata->borderExposed);
|
||||||
if (HasParentRelativeBorder(tChild->pWin)){
|
if (HasParentRelativeBorder(tChild->pWin)){
|
||||||
RegionSubtract(
|
RegionSubtract(&tChild->valdata->borderExposed,
|
||||||
&tChild->valdata->borderExposed,
|
&tChild->borderClip,
|
||||||
&tChild->borderClip,
|
&tChild->pWin->winSize);
|
||||||
&tChild->pWin->winSize);
|
|
||||||
}
|
}
|
||||||
RegionNull(&tChild->valdata->exposed);
|
RegionNull(&tChild->valdata->exposed);
|
||||||
}
|
}
|
||||||
|
@ -1004,7 +1003,6 @@ miOverlayWindowExposures(
|
||||||
RegionPtr other_exposed
|
RegionPtr other_exposed
|
||||||
){
|
){
|
||||||
RegionPtr exposures = prgn;
|
RegionPtr exposures = prgn;
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
if ((prgn && !RegionNil(prgn)) ||
|
if ((prgn && !RegionNil(prgn)) ||
|
||||||
(exposures && !RegionNil(exposures)) || other_exposed)
|
(exposures && !RegionNil(exposures)) || other_exposed)
|
||||||
|
@ -1025,6 +1023,7 @@ miOverlayWindowExposures(
|
||||||
if (clientInterested && exposures &&
|
if (clientInterested && exposures &&
|
||||||
(RegionNumRects(exposures) > RECTLIMIT))
|
(RegionNumRects(exposures) > RECTLIMIT))
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
|
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
|
@ -1074,13 +1073,9 @@ miOverlayRecomputeExposures (
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
pointer value
|
pointer value
|
||||||
){
|
){
|
||||||
ScreenPtr pScreen;
|
|
||||||
miOverlayTwoRegions *pValid = (miOverlayTwoRegions*)value;
|
miOverlayTwoRegions *pValid = (miOverlayTwoRegions*)value;
|
||||||
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
|
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
|
||||||
|
|
||||||
/* This prevents warning about pScreen not being used. */
|
|
||||||
pWin->drawable.pScreen = pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
if (pWin->valdata) {
|
if (pWin->valdata) {
|
||||||
/*
|
/*
|
||||||
* compute exposed regions of this window
|
* compute exposed regions of this window
|
||||||
|
@ -1419,13 +1414,11 @@ miOverlayResizeWindow(
|
||||||
if (oldpt.x != x || oldpt.y != y) {
|
if (oldpt.x != x || oldpt.y != y) {
|
||||||
if(gravitate2[g]) {
|
if(gravitate2[g]) {
|
||||||
pPriv->copyUnderlay = TRUE;
|
pPriv->copyUnderlay = TRUE;
|
||||||
(*pWin->drawable.pScreen->CopyWindow)(
|
(*pScreen->CopyWindow)(pWin, oldpt, gravitate2[g]);
|
||||||
pWin, oldpt, gravitate2[g]);
|
|
||||||
}
|
}
|
||||||
if(gravitate[g]) {
|
if(gravitate[g]) {
|
||||||
pPriv->copyUnderlay = FALSE;
|
pPriv->copyUnderlay = FALSE;
|
||||||
(*pWin->drawable.pScreen->CopyWindow)(
|
(*pScreen->CopyWindow)(pWin, oldpt, gravitate[g]);
|
||||||
pWin, oldpt, gravitate[g]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1730,7 +1723,6 @@ miOverlayCopyUnderlay(ScreenPtr pScreen)
|
||||||
void
|
void
|
||||||
miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin)
|
miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pGC->pScreen;
|
|
||||||
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
|
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
|
||||||
RegionPtr pregWin;
|
RegionPtr pregWin;
|
||||||
Bool freeTmpClip, freeCompClip;
|
Bool freeTmpClip, freeCompClip;
|
||||||
|
@ -1744,7 +1736,7 @@ miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin)
|
||||||
pregWin = RegionCreate(NullBox, 1);
|
pregWin = RegionCreate(NullBox, 1);
|
||||||
freeTmpClip = TRUE;
|
freeTmpClip = TRUE;
|
||||||
if (pWin->parent || (screenIsSaved != SCREEN_SAVER_ON) ||
|
if (pWin->parent || (screenIsSaved != SCREEN_SAVER_ON) ||
|
||||||
!HasSaverWindow (pScreen))
|
!HasSaverWindow (pGC->pScreen))
|
||||||
{
|
{
|
||||||
RegionIntersect(pregWin,&pTree->borderClip,&pWin->winSize);
|
RegionIntersect(pregWin,&pTree->borderClip,&pWin->winSize);
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ Equipment Corporation.
|
||||||
* Compute the visibility of a shaped window
|
* Compute the visibility of a shaped window
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
miShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, RegionPtr bounding,
|
miShapedWindowIn (RegionPtr universe, RegionPtr bounding,
|
||||||
BoxPtr rect, int x, int y)
|
BoxPtr rect, int x, int y)
|
||||||
{
|
{
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
@ -272,7 +272,7 @@ miComputeClips (
|
||||||
|
|
||||||
if ((pBounding = wBoundingShape (pParent)))
|
if ((pBounding = wBoundingShape (pParent)))
|
||||||
{
|
{
|
||||||
switch (miShapedWindowIn (pScreen, universe, pBounding,
|
switch (miShapedWindowIn (universe, pBounding,
|
||||||
&borderSize,
|
&borderSize,
|
||||||
pParent->drawable.x,
|
pParent->drawable.x,
|
||||||
pParent->drawable.y))
|
pParent->drawable.y))
|
||||||
|
@ -331,14 +331,12 @@ miComputeClips (
|
||||||
}
|
}
|
||||||
if (pChild->valdata)
|
if (pChild->valdata)
|
||||||
{
|
{
|
||||||
RegionNull(
|
RegionNull(&pChild->valdata->after.borderExposed);
|
||||||
&pChild->valdata->after.borderExposed);
|
|
||||||
if (HasParentRelativeBorder(pChild))
|
if (HasParentRelativeBorder(pChild))
|
||||||
{
|
{
|
||||||
RegionSubtract(
|
RegionSubtract(&pChild->valdata->after.borderExposed,
|
||||||
&pChild->valdata->after.borderExposed,
|
&pChild->borderClip,
|
||||||
&pChild->borderClip,
|
&pChild->winSize);
|
||||||
&pChild->winSize);
|
|
||||||
}
|
}
|
||||||
RegionNull(&pChild->valdata->after.exposed);
|
RegionNull(&pChild->valdata->after.exposed);
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,6 @@ miClearToBackground(WindowPtr pWin,
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
RegionRec reg;
|
RegionRec reg;
|
||||||
RegionPtr pBSReg = NullRegion;
|
RegionPtr pBSReg = NullRegion;
|
||||||
ScreenPtr pScreen;
|
|
||||||
BoxPtr extents;
|
BoxPtr extents;
|
||||||
int x1, y1, x2, y2;
|
int x1, y1, x2, y2;
|
||||||
|
|
||||||
|
@ -111,12 +110,11 @@ miClearToBackground(WindowPtr pWin,
|
||||||
box.y1 = y1;
|
box.y1 = y1;
|
||||||
box.y2 = y2;
|
box.y2 = y2;
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
RegionInit(®, &box, 1);
|
RegionInit(®, &box, 1);
|
||||||
|
|
||||||
RegionIntersect(®, ®, &pWin->clipList);
|
RegionIntersect(®, ®, &pWin->clipList);
|
||||||
if (generateExposures)
|
if (generateExposures)
|
||||||
(*pScreen->WindowExposures)(pWin, ®, pBSReg);
|
(*pWin->drawable.pScreen->WindowExposures)(pWin, ®, pBSReg);
|
||||||
else if (pWin->backgroundState != None)
|
else if (pWin->backgroundState != None)
|
||||||
miPaintWindow(pWin, ®, PW_BACKGROUND);
|
miPaintWindow(pWin, ®, PW_BACKGROUND);
|
||||||
RegionUninit(®);
|
RegionUninit(®);
|
||||||
|
@ -146,9 +144,6 @@ miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin)
|
||||||
WindowPtr pChild, pLast;
|
WindowPtr pChild, pLast;
|
||||||
Bool anyMarked = FALSE;
|
Bool anyMarked = FALSE;
|
||||||
MarkWindowProcPtr MarkWindow = pWin->drawable.pScreen->MarkWindow;
|
MarkWindowProcPtr MarkWindow = pWin->drawable.pScreen->MarkWindow;
|
||||||
ScreenPtr pScreen;
|
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
/* single layered systems are easy */
|
/* single layered systems are easy */
|
||||||
if (ppLayerWin) *ppLayerWin = pWin;
|
if (ppLayerWin) *ppLayerWin = pWin;
|
||||||
|
@ -230,11 +225,8 @@ miHandleValidateExposures(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
ValidatePtr val;
|
ValidatePtr val;
|
||||||
ScreenPtr pScreen;
|
|
||||||
WindowExposuresProcPtr WindowExposures;
|
WindowExposuresProcPtr WindowExposures;
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
pChild = pWin;
|
pChild = pWin;
|
||||||
WindowExposures = pChild->drawable.pScreen->WindowExposures;
|
WindowExposures = pChild->drawable.pScreen->WindowExposures;
|
||||||
while (1)
|
while (1)
|
||||||
|
@ -339,7 +331,6 @@ miRecomputeExposures (
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
pointer value) /* must conform to VisitWindowProcPtr */
|
pointer value) /* must conform to VisitWindowProcPtr */
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen;
|
|
||||||
RegionPtr pValid = (RegionPtr)value;
|
RegionPtr pValid = (RegionPtr)value;
|
||||||
|
|
||||||
if (pWin->valdata)
|
if (pWin->valdata)
|
||||||
|
@ -353,7 +344,6 @@ miRecomputeExposures (
|
||||||
if (pWin->redirectDraw != RedirectDrawNone)
|
if (pWin->redirectDraw != RedirectDrawNone)
|
||||||
return WT_DONTWALKCHILDREN;
|
return WT_DONTWALKCHILDREN;
|
||||||
#endif
|
#endif
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
/*
|
/*
|
||||||
* compute exposed regions of this window
|
* compute exposed regions of this window
|
||||||
*/
|
*/
|
||||||
|
@ -824,11 +814,8 @@ miMarkUnrealizedWindow(WindowPtr pChild, WindowPtr pWin, Bool fromConfigure)
|
||||||
void
|
void
|
||||||
miSegregateChildren(WindowPtr pWin, RegionPtr pReg, int depth)
|
miSegregateChildren(WindowPtr pWin, RegionPtr pReg, int depth)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen;
|
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
|
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
|
for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
|
||||||
{
|
{
|
||||||
if (pChild->drawable.depth == depth)
|
if (pChild->drawable.depth == depth)
|
||||||
|
|
|
@ -593,8 +593,7 @@ damageDestroyClip(GCPtr pGC)
|
||||||
|
|
||||||
#define checkGCDamage(d,g) (getDrawableDamage(d) && \
|
#define checkGCDamage(d,g) (getDrawableDamage(d) && \
|
||||||
(!g->pCompositeClip ||\
|
(!g->pCompositeClip ||\
|
||||||
RegionNotEmpty(\
|
RegionNotEmpty(g->pCompositeClip)))
|
||||||
g->pCompositeClip)))
|
|
||||||
|
|
||||||
#define TRIM_PICTURE_BOX(box, pDst) { \
|
#define TRIM_PICTURE_BOX(box, pDst) { \
|
||||||
BoxPtr extents = &pDst->pCompositeClip->extents;\
|
BoxPtr extents = &pDst->pCompositeClip->extents;\
|
||||||
|
|
|
@ -262,7 +262,6 @@ void RootlessStopDrawing(WindowPtr pWindow, Bool flush)
|
||||||
void
|
void
|
||||||
RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
|
RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWindow->drawable.pScreen;
|
|
||||||
RootlessWindowRec *winRec;
|
RootlessWindowRec *winRec;
|
||||||
RegionRec clipped;
|
RegionRec clipped;
|
||||||
WindowPtr pTop;
|
WindowPtr pTop;
|
||||||
|
@ -307,7 +306,8 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
|
||||||
RegionUnion(&winRec->damage,
|
RegionUnion(&winRec->damage,
|
||||||
&winRec->damage, (pRegion));
|
&winRec->damage, (pRegion));
|
||||||
#else
|
#else
|
||||||
SCREENREC(pScreen)->imp->DamageRects(winRec->wid,
|
SCREENREC(pWindow->drawable.pScreen)->imp->
|
||||||
|
DamageRects(winRec->wid,
|
||||||
RegionNumRects(pRegion),
|
RegionNumRects(pRegion),
|
||||||
RegionRects(pRegion),
|
RegionRects(pRegion),
|
||||||
-winRec->x, -winRec->y);
|
-winRec->x, -winRec->y);
|
||||||
|
@ -332,7 +332,8 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
|
||||||
RegionUnion(&winRec->damage,
|
RegionUnion(&winRec->damage,
|
||||||
&winRec->damage, (pRegion));
|
&winRec->damage, (pRegion));
|
||||||
#else
|
#else
|
||||||
SCREENREC(pScreen)->imp->DamageRects(winRec->wid,
|
SCREENREC(pWindow->drawable.pScreen)->imp->
|
||||||
|
DamageRects(winRec->wid,
|
||||||
RegionNumRects(&clipped),
|
RegionNumRects(&clipped),
|
||||||
RegionRects(&clipped),
|
RegionRects(&clipped),
|
||||||
-winRec->x, -winRec->y);
|
-winRec->x, -winRec->y);
|
||||||
|
|
|
@ -104,16 +104,13 @@ Equipment Corporation.
|
||||||
|
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
|
|
||||||
int RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe,
|
|
||||||
RegionPtr bounding, BoxPtr rect, int x, int y);
|
|
||||||
|
|
||||||
int RootlessMiValidateTree (WindowPtr pRoot, WindowPtr pChild, VTKind kind);
|
int RootlessMiValidateTree (WindowPtr pRoot, WindowPtr pChild, VTKind kind);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Compute the visibility of a shaped window
|
* Compute the visibility of a shaped window
|
||||||
*/
|
*/
|
||||||
int
|
static int
|
||||||
RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe,
|
RootlessShapedWindowIn (RegionPtr universe,
|
||||||
RegionPtr bounding, BoxPtr rect, int x, int y)
|
RegionPtr bounding, BoxPtr rect, int x, int y)
|
||||||
{
|
{
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
@ -236,7 +233,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
|
||||||
|
|
||||||
if ((pBounding = wBoundingShape (pParent)))
|
if ((pBounding = wBoundingShape (pParent)))
|
||||||
{
|
{
|
||||||
switch (RootlessShapedWindowIn (pScreen, universe,
|
switch (RootlessShapedWindowIn (universe,
|
||||||
pBounding, &borderSize,
|
pBounding, &borderSize,
|
||||||
pParent->drawable.x,
|
pParent->drawable.x,
|
||||||
pParent->drawable.y))
|
pParent->drawable.y))
|
||||||
|
@ -296,14 +293,12 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
|
||||||
}
|
}
|
||||||
if (pChild->valdata)
|
if (pChild->valdata)
|
||||||
{
|
{
|
||||||
RegionNull(
|
RegionNull(&pChild->valdata->after.borderExposed);
|
||||||
&pChild->valdata->after.borderExposed);
|
|
||||||
if (HasParentRelativeBorder(pChild))
|
if (HasParentRelativeBorder(pChild))
|
||||||
{
|
{
|
||||||
RegionSubtract(
|
RegionSubtract(&pChild->valdata->after.borderExposed,
|
||||||
&pChild->valdata->after.borderExposed,
|
&pChild->borderClip,
|
||||||
&pChild->borderClip,
|
&pChild->winSize);
|
||||||
&pChild->winSize);
|
|
||||||
}
|
}
|
||||||
RegionNull(&pChild->valdata->after.exposed);
|
RegionNull(&pChild->valdata->after.exposed);
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,9 +179,7 @@ RootlessCreateWindow(WindowPtr pWin)
|
||||||
static void
|
static void
|
||||||
RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec)
|
RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
SCREENREC(pWin->drawable.pScreen)->imp->DestroyFrame(winRec->wid);
|
||||||
|
|
||||||
SCREENREC(pScreen)->imp->DestroyFrame(winRec->wid);
|
|
||||||
|
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
#ifdef ROOTLESS_TRACK_DAMAGE
|
||||||
RegionUninit(&winRec->damage);
|
RegionUninit(&winRec->damage);
|
||||||
|
@ -218,14 +216,6 @@ RootlessDestroyWindow(WindowPtr pWin)
|
||||||
static Bool
|
static Bool
|
||||||
RootlessGetShape(WindowPtr pWin, RegionPtr pShape)
|
RootlessGetShape(WindowPtr pWin, RegionPtr pShape)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Avoid a warning.
|
|
||||||
* REGION_NULL and the other macros don't actually seem to use pScreen.
|
|
||||||
*/
|
|
||||||
(void)pScreen;
|
|
||||||
|
|
||||||
if (wBoundingShape(pWin) == NULL)
|
if (wBoundingShape(pWin) == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -247,7 +237,6 @@ RootlessGetShape(WindowPtr pWin, RegionPtr pShape)
|
||||||
static void RootlessReshapeFrame(WindowPtr pWin)
|
static void RootlessReshapeFrame(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
RootlessWindowRec *winRec = WINREC(pWin);
|
RootlessWindowRec *winRec = WINREC(pWin);
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
||||||
RegionRec newShape;
|
RegionRec newShape;
|
||||||
RegionPtr pShape;
|
RegionPtr pShape;
|
||||||
|
|
||||||
|
@ -274,7 +263,7 @@ static void RootlessReshapeFrame(WindowPtr pWin)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SCREENREC(pScreen)->imp->ReshapeFrame(winRec->wid, pShape);
|
SCREENREC(pWin->drawable.pScreen)->imp->ReshapeFrame(winRec->wid, pShape);
|
||||||
|
|
||||||
if (pShape != NULL)
|
if (pShape != NULL)
|
||||||
RegionUninit(&newShape);
|
RegionUninit(&newShape);
|
||||||
|
|
|
@ -42,7 +42,6 @@ miColorRects (PicturePtr pDst,
|
||||||
int xoff,
|
int xoff,
|
||||||
int yoff)
|
int yoff)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
|
||||||
CARD32 pixel;
|
CARD32 pixel;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
ChangeGCVal tmpval[5];
|
ChangeGCVal tmpval[5];
|
||||||
|
@ -51,7 +50,7 @@ miColorRects (PicturePtr pDst,
|
||||||
|
|
||||||
miRenderColorToPixel (pDst->pFormat, color, &pixel);
|
miRenderColorToPixel (pDst->pFormat, color, &pixel);
|
||||||
|
|
||||||
pGC = GetScratchGC (pDst->pDrawable->depth, pScreen);
|
pGC = GetScratchGC (pDst->pDrawable->depth, pDst->pDrawable->pScreen);
|
||||||
if (!pGC)
|
if (!pGC)
|
||||||
return;
|
return;
|
||||||
tmpval[0].val = GXcopy;
|
tmpval[0].val = GXcopy;
|
||||||
|
|
|
@ -1300,8 +1300,7 @@ SetPictureClipRects (PicturePtr pPicture,
|
||||||
RegionPtr clientClip;
|
RegionPtr clientClip;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
clientClip = RegionFromRects(
|
clientClip = RegionFromRects(nRect, rects, CT_UNSORTED);
|
||||||
nRect, rects, CT_UNSORTED);
|
|
||||||
if (!clientClip)
|
if (!clientClip)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
result =(*ps->ChangePictureClip) (pPicture, CT_REGION,
|
result =(*ps->ChangePictureClip) (pPicture, CT_REGION,
|
||||||
|
@ -1331,9 +1330,8 @@ SetPictureClipRegion (PicturePtr pPicture,
|
||||||
if (pRegion)
|
if (pRegion)
|
||||||
{
|
{
|
||||||
type = CT_REGION;
|
type = CT_REGION;
|
||||||
clientClip = RegionCreate(
|
clientClip = RegionCreate(RegionExtents(pRegion),
|
||||||
RegionExtents(pRegion),
|
RegionNumRects(pRegion));
|
||||||
RegionNumRects(pRegion));
|
|
||||||
if (!clientClip)
|
if (!clientClip)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
if (!RegionCopy(clientClip, pRegion))
|
if (!RegionCopy(clientClip, pRegion))
|
||||||
|
|
|
@ -663,7 +663,6 @@ int
|
||||||
ProcXFixesSetWindowShapeRegion (ClientPtr client)
|
ProcXFixesSetWindowShapeRegion (ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
ScreenPtr pScreen;
|
|
||||||
RegionPtr pRegion;
|
RegionPtr pRegion;
|
||||||
RegionPtr *pDestRegion;
|
RegionPtr *pDestRegion;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -678,7 +677,6 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixWriteAccess);
|
VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixWriteAccess);
|
||||||
pScreen = pWin->drawable.pScreen;
|
|
||||||
switch (stuff->destKind) {
|
switch (stuff->destKind) {
|
||||||
case ShapeBounding:
|
case ShapeBounding:
|
||||||
case ShapeClip:
|
case ShapeClip:
|
||||||
|
@ -733,7 +731,7 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client)
|
||||||
if (*pDestRegion)
|
if (*pDestRegion)
|
||||||
RegionDestroy(*pDestRegion);
|
RegionDestroy(*pDestRegion);
|
||||||
*pDestRegion = pRegion;
|
*pDestRegion = pRegion;
|
||||||
(*pScreen->SetShape) (pWin, stuff->destKind);
|
(*pWin->drawable.pScreen->SetShape) (pWin, stuff->destKind);
|
||||||
SendShapeNotify (pWin, stuff->destKind);
|
SendShapeNotify (pWin, stuff->destKind);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue