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