summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2015-06-02 13:58:30 -0400
committerAdam Jackson <ajax@redhat.com>2015-07-08 16:41:28 -0400
commitcbd3cfbad3f07b20e90ea9498110f255813eb441 (patch)
tree18ea660c0d607e33d059f262d68e562c9771fc12 /mi
parent74d64ceea02bffad1caf3d1a727edbd38d968059 (diff)
dix: Restore PaintWindow screen hook
Removes the last cpp conditional on ROOTLESS from dix code. Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'mi')
-rw-r--r--mi/miexpose.c32
-rw-r--r--mi/mioverlay.c12
-rw-r--r--mi/miscrinit.c1
-rw-r--r--mi/miwindow.c6
4 files changed, 17 insertions, 34 deletions
diff --git a/mi/miexpose.c b/mi/miexpose.c
index f4c6e89a0..148d1a63b 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -268,10 +268,11 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
RegionTranslate(&rgnExposed, pDstDrawable->x, pDstDrawable->y);
if (extents) {
- /* miPaintWindow doesn't clip, so we have to */
+ /* PaintWindow doesn't clip, so we have to */
RegionIntersect(&rgnExposed, &rgnExposed, &pWin->clipList);
}
- miPaintWindow((WindowPtr) pDstDrawable, &rgnExposed, PW_BACKGROUND);
+ pDstDrawable->pScreen->PaintWindow((WindowPtr) pDstDrawable,
+ &rgnExposed, PW_BACKGROUND);
if (extents) {
RegionReset(&rgnExposed, &expBox);
@@ -383,16 +384,14 @@ miWindowExposures(WindowPtr pWin, RegionPtr prgn)
* work overall, on both client and server. This is cheating, but
* isn't prohibited by the protocol ("spontaneous combustion" :-).
*/
- BoxRec box;
-
- box = *RegionExtents(prgn);
+ BoxRec box = *RegionExtents(prgn);
exposures = &expRec;
RegionInit(exposures, &box, 1);
RegionReset(prgn, &box);
/* miPaintWindow doesn't clip, so we have to */
RegionIntersect(prgn, prgn, &pWin->clipList);
}
- miPaintWindow(pWin, prgn, PW_BACKGROUND);
+ pWin->drawable.pScreen->PaintWindow(pWin, prgn, PW_BACKGROUND);
if (clientInterested)
miSendExposures(pWin, exposures,
pWin->drawable.x, pWin->drawable.y);
@@ -402,14 +401,6 @@ miWindowExposures(WindowPtr pWin, RegionPtr prgn)
}
}
-#ifdef ROOTLESS
-/* Ugly, ugly, but we lost our hooks into miPaintWindow... =/ */
-void RootlessSetPixmapOfAncestors(WindowPtr pWin);
-void RootlessStartDrawing(WindowPtr pWin);
-void RootlessDamageRegion(WindowPtr pWin, RegionPtr prgn);
-Bool IsFramedWindow(WindowPtr pWin);
-#endif
-
void
miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
{
@@ -437,19 +428,6 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
Bool solid = TRUE;
DrawablePtr drawable = &pWin->drawable;
-#ifdef ROOTLESS
- if (IsFramedWindow(pWin)) {
- RootlessStartDrawing(pWin);
- RootlessDamageRegion(pWin, prgn);
-
- if (pWin->backgroundState == ParentRelative) {
- if ((what == PW_BACKGROUND) ||
- (what == PW_BORDER && !pWin->borderIsPixel))
- RootlessSetPixmapOfAncestors(pWin);
- }
- }
-#endif
-
if (what == PW_BACKGROUND) {
while (pWin->backgroundState == ParentRelative)
pWin = pWin->parent;
diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index 2b20fd72f..9f3ef0725 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -844,8 +844,8 @@ miOverlayHandleExposures(WindowPtr pWin)
if ((mival = pTree->valdata)) {
if (!((*pPriv->InOverlay) (pTree->pWin))) {
if (RegionNotEmpty(&mival->borderExposed)) {
- miPaintWindow(pTree->pWin, &mival->borderExposed,
- PW_BORDER);
+ pScreen->PaintWindow(pTree->pWin, &mival->borderExposed,
+ PW_BORDER);
}
RegionUninit(&mival->borderExposed);
@@ -883,7 +883,8 @@ miOverlayHandleExposures(WindowPtr pWin)
}
else {
if (RegionNotEmpty(&val->after.borderExposed)) {
- miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER);
+ pScreen->PaintWindow(pChild, &val->after.borderExposed,
+ PW_BORDER);
}
(*WindowExposures) (pChild, &val->after.exposed);
}
@@ -982,6 +983,7 @@ static void
miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
{
RegionPtr exposures = prgn;
+ ScreenPtr pScreen = pWin->drawable.pScreen;
if (prgn && !RegionNil(prgn)) {
RegionRec expRec;
@@ -1007,7 +1009,7 @@ miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
else
RegionIntersect(prgn, prgn, &pWin->clipList);
}
- miPaintWindow(pWin, prgn, PW_BACKGROUND);
+ pScreen->PaintWindow(pWin, prgn, PW_BACKGROUND);
if (clientInterested)
miSendExposures(pWin, exposures,
pWin->drawable.x, pWin->drawable.y);
@@ -1606,7 +1608,7 @@ miOverlayClearToBackground(WindowPtr pWin,
if (generateExposures)
(*pScreen->WindowExposures) (pWin, &reg);
else if (pWin->backgroundState != None)
- miPaintWindow(pWin, &reg, PW_BACKGROUND);
+ pScreen->PaintWindow(pWin, &reg, PW_BACKGROUND);
RegionUninit(&reg);
}
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index b53c7e41a..9c6af0dc7 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -253,6 +253,7 @@ miScreenInit(ScreenPtr pScreen, void *pbits, /* pointer to screen bits */
pScreen->ClearToBackground = miClearToBackground;
pScreen->ClipNotify = (ClipNotifyProcPtr) 0;
pScreen->RestackWindow = (RestackWindowProcPtr) 0;
+ pScreen->PaintWindow = miPaintWindow;
/* CreatePixmap, DestroyPixmap */
/* RealizeFont, UnrealizeFont */
/* CreateGC */
diff --git a/mi/miwindow.c b/mi/miwindow.c
index 2fc7cfb79..39c279e18 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -113,7 +113,7 @@ miClearToBackground(WindowPtr pWin,
if (generateExposures)
(*pWin->drawable.pScreen->WindowExposures) (pWin, &reg);
else if (pWin->backgroundState != None)
- miPaintWindow(pWin, &reg, PW_BACKGROUND);
+ pWin->drawable.pScreen->PaintWindow(pWin, &reg, PW_BACKGROUND);
RegionUninit(&reg);
}
@@ -219,7 +219,9 @@ miHandleValidateExposures(WindowPtr pWin)
while (1) {
if ((val = pChild->valdata)) {
if (RegionNotEmpty(&val->after.borderExposed))
- miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER);
+ pWin->drawable.pScreen->PaintWindow(pChild,
+ &val->after.borderExposed,
+ PW_BORDER);
RegionUninit(&val->after.borderExposed);
(*WindowExposures) (pChild, &val->after.exposed);
RegionUninit(&val->after.exposed);