summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-06-05 20:55:29 -0700
committerJamey Sharp <jamey@minilop.net>2010-06-05 22:07:21 -0700
commita0fe6987b55b5326157b50e169b8d6b9ae26a1ae (patch)
tree30bd5b4a9fef3d1435059bb2a32d4e8d9916195c
parent424b593c7872a703d3d0c942b7e8acc0770eb023 (diff)
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>
-rw-r--r--Xext/panoramiXprocs.c9
-rw-r--r--Xext/shape.c14
-rw-r--r--Xext/xace.c3
-rw-r--r--damageext/damageext.c2
-rw-r--r--dix/dispatch.c13
-rw-r--r--dix/events.c35
-rw-r--r--dix/window.c46
-rw-r--r--fb/fb.h3
-rw-r--r--fb/fbglyph.c2
-rw-r--r--fb/fboverlay.c28
-rw-r--r--hw/dmx/dmxpixmap.c3
-rw-r--r--hw/xfree86/common/xf86xv.c21
-rw-r--r--hw/xfree86/shadowfb/shadow.c26
-rw-r--r--hw/xnest/Window.c18
-rw-r--r--hw/xwin/winmultiwindowshape.c5
-rw-r--r--hw/xwin/winwindow.c1
-rwxr-xr-xhw/xwin/winwindowswm.c2
-rw-r--r--mi/mi.h1
-rw-r--r--mi/micopy.c3
-rw-r--r--mi/miexpose.c4
-rw-r--r--mi/migc.c8
-rw-r--r--mi/mioverlay.c26
-rw-r--r--mi/mivaltree.c14
-rw-r--r--mi/miwindow.c15
-rw-r--r--miext/damage/damage.c3
-rw-r--r--miext/rootless/rootlessCommon.c7
-rw-r--r--miext/rootless/rootlessValTree.c19
-rw-r--r--miext/rootless/rootlessWindow.c15
-rw-r--r--render/mirect.c3
-rw-r--r--render/picture.c8
-rw-r--r--xfixes/region.c4
31 files changed, 102 insertions, 259 deletions
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index 457e071a1..3cd2969ac 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -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);
}
diff --git a/Xext/shape.c b/Xext/shape.c
index fb5b9a76c..33c0cb3e5 100644
--- a/Xext/shape.c
+++ b/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;
diff --git a/Xext/xace.c b/Xext/xace.c
index 07e3da516..94b5b37c0 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -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;
diff --git a/damageext/damageext.c b/damageext/damageext.c
index 926504e87..f5265ddfc 100644
--- a/damageext/damageext.c
+++ b/damageext/damageext.c
@@ -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)
{
diff --git a/dix/dispatch.c b/dix/dispatch.c
index ffb376470..d32950d05 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -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);
}
}
diff --git a/dix/events.c b/dix/events.c
index 4c53b55d3..3ea639e15 100644
--- a/dix/events.c
+++ b/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;
}
}
diff --git a/dix/window.c b/dix/window.c
index 7caa1ccd7..8ccbf658e 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -489,12 +489,8 @@ ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn,
int x, int y,
int w, int h)
{
- ScreenPtr pScreen;
- BoxRec box;
-
- pScreen = pWin->drawable.pScreen;
+ BoxRec box = *RegionExtents(&pWin->winSize);
- 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))
diff --git a/fb/fb.h b/fb/fb.h
index 4fde42647..a06f98be2 100644
--- a/fb/fb.h
+++ b/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 ? \
diff --git a/fb/fbglyph.c b/fb/fbglyph.c
index 44fe80fc9..8208081e2 100644
--- a/fb/fbglyph.c
+++ b/fb/fbglyph.c
@@ -29,8 +29,6 @@
#include <X11/fonts/fontstruct.h>
#include "dixfontstr.h"
-#define dummyScreen screenInfo.screens[0]
-
Bool
fbGlyphIn (RegionPtr pRegion,
int x,
diff --git a/fb/fboverlay.c b/fb/fboverlay.c
index cda7fc793..7fca89c44 100644
--- a/fb/fboverlay.c
+++ b/fb/fboverlay.c
@@ -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;
diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c
index a058ae285..587a27dad 100644
--- a/hw/dmx/dmxpixmap.c
+++ b/hw/dmx/dmxpixmap.c
@@ -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;
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index a979dd3eb..3d5d9a685 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -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,
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index 2066f7631..977398177 100644
--- a/hw/xfree86/shadowfb/shadow.c
+++ b/hw/xfree86/shadowfb/shadow.c
@@ -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);
}
}
diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c
index 659b13537..9ed69ed74 100644
--- a/hw/xnest/Window.c
+++ b/hw/xnest/Window.c
@@ -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);
diff --git a/hw/xwin/winmultiwindowshape.c b/hw/xwin/winmultiwindowshape.c
index 9b4910b9c..6b7042e09 100644
--- a/hw/xwin/winmultiwindowshape.c
+++ b/hw/xwin/winmultiwindowshape.c
@@ -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);
diff --git a/hw/xwin/winwindow.c b/hw/xwin/winwindow.c
index bc0614dc1..783760f4b 100644
--- a/hw/xwin/winwindow.c
+++ b/hw/xwin/winwindow.c
@@ -564,7 +564,6 @@ void
winReshapeRootless (WindowPtr pWin)
{
int nRects;
- /* ScreenPtr pScreen = pWin->drawable.pScreen;*/
RegionRec rrNewShape;
BoxPtr pShape, pRects, pEnd;
HRGN hRgn, hRgnRect;
diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c
index 5935ac453..34d7f4b5c 100755
--- a/hw/xwin/winwindowswm.c
+++ b/hw/xwin/winwindowswm.c
@@ -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. */
diff --git a/mi/mi.h b/mi/mi.h
index fa32b6b62..57837c450 100644
--- a/mi/mi.h
+++ b/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*/,
diff --git a/mi/micopy.c b/mi/micopy.c
index 157e32430..b1a7a0850 100644
--- a/mi/micopy.c
+++ b/mi/micopy.c
@@ -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
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 2fd070d9e..94258b864 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -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) &&
diff --git a/mi/migc.c b/mi/migc.c
index 778c4b463..6d734e1b6 100644
--- a/mi/migc.c
+++ b/mi/migc.c
@@ -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;
diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index aa00e234c..e7a9401e4 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -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);
}
diff --git a/mi/mivaltree.c b/mi/mivaltree.c
index dc88c4d77..7e0c22ac0 100644
--- a/mi/mivaltree.c
+++ b/mi/mivaltree.c
@@ -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);
}
diff --git a/mi/miwindow.c b/mi/miwindow.c
index 02b407486..51c5cc82e 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -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(&reg, &box, 1);
RegionIntersect(&reg, &reg, &pWin->clipList);
if (generateExposures)
- (*pScreen->WindowExposures)(pWin, &reg, pBSReg);
+ (*pWin->drawable.pScreen->WindowExposures)(pWin, &reg, pBSReg);
else if (pWin->backgroundState != None)
miPaintWindow(pWin, &reg, PW_BACKGROUND);
RegionUninit(&reg);
@@ -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)
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index ef7974ef6..7c2f8a048 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -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;\
diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c
index 4fb0e4970..82fe0b936 100644
--- a/miext/rootless/rootlessCommon.c
+++ b/miext/rootless/rootlessCommon.c
@@ -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);
diff --git a/miext/rootless/rootlessValTree.c b/miext/rootless/rootlessValTree.c
index 0f62c28f4..e2c4ffe87 100644
--- a/miext/rootless/rootlessValTree.c
+++ b/miext/rootless/rootlessValTree.c
@@ -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);
}
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index 7f0321434..7fe5e1d8a 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -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);
diff --git a/render/mirect.c b/render/mirect.c
index 6a3112a09..4fb347a93 100644
--- a/render/mirect.c
+++ b/render/mirect.c
@@ -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;
diff --git a/render/picture.c b/render/picture.c
index f6e3a9e08..f55711d48 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -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))
diff --git a/xfixes/region.c b/xfixes/region.c
index 4fdfa203a..4a3ec334a 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -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;
}