aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/mi')
-rw-r--r--xorg-server/mi/mi.h37
-rw-r--r--xorg-server/mi/mibitblt.c5
-rw-r--r--xorg-server/mi/micmap.c44
-rw-r--r--xorg-server/mi/micopy.c3
-rw-r--r--xorg-server/mi/miexpose.c109
-rw-r--r--xorg-server/mi/mioverlay.c70
-rw-r--r--xorg-server/mi/miscrinit.c3
-rw-r--r--xorg-server/mi/mivaltree.c52
-rw-r--r--xorg-server/mi/miwindow.c41
9 files changed, 82 insertions, 282 deletions
diff --git a/xorg-server/mi/mi.h b/xorg-server/mi/mi.h
index d5a5ba374..5a455c910 100644
--- a/xorg-server/mi/mi.h
+++ b/xorg-server/mi/mi.h
@@ -229,15 +229,7 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ ,
int /*width */ ,
int /*height */ ,
int /*dstx */ ,
- int /*dsty */ ,
- unsigned long /*plane */
- );
-
-extern _X_EXPORT void miSendGraphicsExpose(ClientPtr /*client */ ,
- RegionPtr /*pRgn */ ,
- XID /*drawable */ ,
- int /*major */ ,
- int /*minor */
+ int /*dsty */
);
extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ ,
@@ -247,9 +239,7 @@ extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ ,
);
extern _X_EXPORT void miWindowExposures(WindowPtr /*pWin */ ,
- RegionPtr /*prgn */ ,
- RegionPtr /*other_exposed */
- );
+ RegionPtr /*prgn */);
extern _X_EXPORT void miPaintWindow(WindowPtr /*pWin */ ,
RegionPtr /*prgn */ ,
@@ -427,17 +417,6 @@ extern _X_EXPORT int miShapedWindowIn(RegionPtr /*universe */ ,
int /*y */
);
-typedef void
- (*SetRedirectBorderClipProcPtr) (WindowPtr pWindow, RegionPtr pRegion);
-
-typedef RegionPtr
- (*GetRedirectBorderClipProcPtr) (WindowPtr pWindow);
-
-extern _X_EXPORT void
-
-miRegisterRedirectBorderClipProc(SetRedirectBorderClipProcPtr setBorderClip,
- GetRedirectBorderClipProcPtr getBorderClip);
-
extern _X_EXPORT int miValidateTree(WindowPtr /*pParent */ ,
WindowPtr /*pChild */ ,
VTKind /*kind */
@@ -491,12 +470,12 @@ extern _X_EXPORT void miMoveWindow(WindowPtr /*pWin */ ,
VTKind /*kind */
);
-extern _X_EXPORT void miSlideAndSizeWindow(WindowPtr /*pWin */ ,
- int /*x */ ,
- int /*y */ ,
- unsigned int /*w */ ,
- unsigned int /*h */ ,
- WindowPtr /*pSib */
+extern _X_EXPORT void miResizeWindow(WindowPtr /*pWin */ ,
+ int /*x */ ,
+ int /*y */ ,
+ unsigned int /*w */ ,
+ unsigned int /*h */ ,
+ WindowPtr /*pSib */
);
extern _X_EXPORT WindowPtr miGetLayerWindow(WindowPtr /*pWin */
diff --git a/xorg-server/mi/mibitblt.c b/xorg-server/mi/mibitblt.c
index 3ed4ed1cc..08bd1c5b2 100644
--- a/xorg-server/mi/mibitblt.c
+++ b/xorg-server/mi/mibitblt.c
@@ -242,8 +242,7 @@ miCopyArea(DrawablePtr pSrcDrawable,
}
}
prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn,
- widthSrc, heightSrc, xOut, yOut,
- (unsigned long) 0);
+ widthSrc, heightSrc, xOut, yOut);
if (realSrcClip)
RegionDestroy(prgnSrcClip);
@@ -579,7 +578,7 @@ miCopyPlane(DrawablePtr pSrcDrawable,
}
}
prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy,
- width, height, dstx, dsty, bitPlane);
+ width, height, dstx, dsty);
RegionDestroy(prgnSrc);
return prgnExposed;
}
diff --git a/xorg-server/mi/micmap.c b/xorg-server/mi/micmap.c
index 4648b9a70..1aeb359ba 100644
--- a/xorg-server/mi/micmap.c
+++ b/xorg-server/mi/micmap.c
@@ -235,42 +235,7 @@ miExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem * indefs,
Bool
miCreateDefColormap(ScreenPtr pScreen)
{
-/*
- * In the following sources PC X server vendors may want to delete
- * "_not_tog" from "#ifdef WIN32_not_tog"
- */
-#ifdef WIN32_not_tog
- /*
- * these are the MS-Windows desktop colors, adjusted for X's 16-bit
- * color specifications.
- */
- static xColorItem citems[] = {
- {0, 0, 0, 0, 0, 0},
- {1, 0x8000, 0, 0, 0, 0},
- {2, 0, 0x8000, 0, 0, 0},
- {3, 0x8000, 0x8000, 0, 0, 0},
- {4, 0, 0, 0x8000, 0, 0},
- {5, 0x8000, 0, 0x8000, 0, 0},
- {6, 0, 0x8000, 0x8000, 0, 0},
- {7, 0xc000, 0xc000, 0xc000, 0, 0},
- {8, 0xc000, 0xdc00, 0xc000, 0, 0},
- {9, 0xa600, 0xca00, 0xf000, 0, 0},
- {246, 0xff00, 0xfb00, 0xf000, 0, 0},
- {247, 0xa000, 0xa000, 0xa400, 0, 0},
- {248, 0x8000, 0x8000, 0x8000, 0, 0},
- {249, 0xff00, 0, 0, 0, 0},
- {250, 0, 0xff00, 0, 0, 0},
- {251, 0xff00, 0xff00, 0, 0, 0},
- {252, 0, 0, 0xff00, 0, 0},
- {253, 0xff00, 0, 0xff00, 0, 0},
- {254, 0, 0xff00, 0xff00, 0, 0},
- {255, 0xff00, 0xff00, 0xff00, 0, 0}
- };
-#define NUM_DESKTOP_COLORS sizeof citems / sizeof citems[0]
- int i;
-#else
unsigned short zero = 0, ones = 0xFFFF;
-#endif
Pixel wp, bp;
VisualPtr pVisual;
ColormapPtr cmap;
@@ -294,21 +259,12 @@ miCreateDefColormap(ScreenPtr pScreen)
if (pScreen->rootDepth > 1) {
wp = pScreen->whitePixel;
bp = pScreen->blackPixel;
-#ifdef WIN32_not_tog
- for (i = 0; i < NUM_DESKTOP_COLORS; i++) {
- if (AllocColor(cmap,
- &citems[i].red, &citems[i].green, &citems[i].blue,
- &citems[i].pixel, 0) != Success)
- return FALSE;
- }
-#else
if ((AllocColor(cmap, &ones, &ones, &ones, &wp, 0) !=
Success) ||
(AllocColor(cmap, &zero, &zero, &zero, &bp, 0) != Success))
return FALSE;
pScreen->whitePixel = wp;
pScreen->blackPixel = bp;
-#endif
}
(*pScreen->InstallColormap) (cmap);
diff --git a/xorg-server/mi/micopy.c b/xorg-server/mi/micopy.c
index 30795114d..a52b0a786 100644
--- a/xorg-server/mi/micopy.c
+++ b/xorg-server/mi/micopy.c
@@ -304,8 +304,7 @@ miDoCopy(DrawablePtr pSrcDrawable,
yIn - pSrcDrawable->y,
widthSrc, heightSrc,
xOut - pDstDrawable->x,
- yOut - pDstDrawable->y,
- (unsigned long) bitPlane);
+ yOut - pDstDrawable->y);
RegionUninit(&rgnDst);
if (freeSrcClip)
RegionDestroy(prgnSrcClip);
diff --git a/xorg-server/mi/miexpose.c b/xorg-server/mi/miexpose.c
index 198c4332f..de8ee6c2a 100644
--- a/xorg-server/mi/miexpose.c
+++ b/xorg-server/mi/miexpose.c
@@ -116,18 +116,12 @@ NOTE:
this should generally be called, even if graphicsExposures is false,
because this is where bits get recovered from backing store.
-NOTE:
- added argument 'plane' is used to indicate how exposures from backing
-store should be accomplished. If plane is 0 (i.e. no bit plane), CopyArea
-should be used, else a CopyPlane of the indicated plane will be used. The
-exposing is done by the backing store's GraphicsExpose function, of course.
-
*/
RegionPtr
miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
GCPtr pGC, int srcx, int srcy, int width, int height,
- int dstx, int dsty, unsigned long plane)
+ int dstx, int dsty)
{
RegionPtr prgnSrcClip; /* drawable-relative source clip */
RegionRec rgnSrcRec;
@@ -149,7 +143,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
if (!pGC->graphicsExposures &&
(pDstDrawable->type == DRAWABLE_PIXMAP) &&
((pSrcDrawable->type == DRAWABLE_PIXMAP) ||
- (((WindowPtr) pSrcDrawable)->backStorage == NULL)))
+ (((WindowPtr) pSrcDrawable)->backStorage == 0)))
return NULL;
srcBox.x1 = srcx;
@@ -312,53 +306,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
}
}
-/* send GraphicsExpose events, or a NoExpose event, based on the region */
-
-void
-miSendGraphicsExpose(ClientPtr client, RegionPtr pRgn, XID drawable,
- int major, int minor)
-{
- if (pRgn && !RegionNil(pRgn)) {
- xEvent *pEvent;
- xEvent *pe;
- BoxPtr pBox;
- int i;
- int numRects;
-
- numRects = RegionNumRects(pRgn);
- pBox = RegionRects(pRgn);
- if (!(pEvent = calloc(numRects, sizeof(xEvent))))
- return;
- pe = pEvent;
-
- for (i = 1; i <= numRects; i++, pe++, pBox++) {
- pe->u.u.type = GraphicsExpose;
- pe->u.graphicsExposure.drawable = drawable;
- pe->u.graphicsExposure.x = pBox->x1;
- pe->u.graphicsExposure.y = pBox->y1;
- pe->u.graphicsExposure.width = pBox->x2 - pBox->x1;
- pe->u.graphicsExposure.height = pBox->y2 - pBox->y1;
- pe->u.graphicsExposure.count = numRects - i;
- pe->u.graphicsExposure.majorEvent = major;
- pe->u.graphicsExposure.minorEvent = minor;
- }
- /* GraphicsExpose is a "critical event", which TryClientEvents
- * handles specially. */
- TryClientEvents(client, NULL, pEvent, numRects,
- (Mask) 0, NoEventMask, NullGrab);
- free(pEvent);
- }
- else {
- xEvent event = {
- .u.noExposure.drawable = drawable,
- .u.noExposure.majorEvent = major,
- .u.noExposure.minorEvent = minor
- };
- event.u.u.type = NoExpose;
- WriteEventsToClient(client, 1, &event);
- }
-}
-
void
miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
{
@@ -421,30 +368,15 @@ miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
}
void
-miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
+miWindowExposures(WindowPtr pWin, RegionPtr prgn)
{
RegionPtr exposures = prgn;
- if ((prgn && !RegionNil(prgn)) ||
- (exposures && !RegionNil(exposures)) || other_exposed) {
+ if (prgn && !RegionNil(prgn)) {
RegionRec expRec;
- int clientInterested;
-
- /*
- * Restore from backing-store FIRST.
- */
- clientInterested =
+ int clientInterested =
(pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask;
- if (other_exposed) {
- if (exposures) {
- RegionUnion(other_exposed, exposures, other_exposed);
- if (exposures != prgn)
- RegionDestroy(exposures);
- }
- exposures = other_exposed;
- }
- if (clientInterested && exposures &&
- (RegionNumRects(exposures) > RECTLIMIT)) {
+ if (clientInterested && (RegionNumRects(prgn) > RECTLIMIT)) {
/*
* If we have LOTS of rectangles, we decide to take the extents
* and force an exposure on that. This should require much less
@@ -453,34 +385,21 @@ miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
*/
BoxRec box;
- box = *RegionExtents(exposures);
- if (exposures == prgn) {
- exposures = &expRec;
- RegionInit(exposures, &box, 1);
- RegionReset(prgn, &box);
- }
- else {
- RegionReset(exposures, &box);
- RegionUnion(prgn, prgn, exposures);
- }
+ 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);
}
- if (prgn && !RegionNil(prgn))
- miPaintWindow(pWin, prgn, PW_BACKGROUND);
- if (clientInterested && exposures && !RegionNil(exposures))
+ miPaintWindow(pWin, prgn, PW_BACKGROUND);
+ if (clientInterested)
miSendExposures(pWin, exposures,
pWin->drawable.x, pWin->drawable.y);
- if (exposures == &expRec) {
+ if (exposures == &expRec)
RegionUninit(exposures);
- }
- else if (exposures && exposures != prgn && exposures != other_exposed)
- RegionDestroy(exposures);
- if (prgn)
- RegionEmpty(prgn);
+ RegionEmpty(prgn);
}
- else if (exposures && exposures != prgn)
- RegionDestroy(exposures);
}
#ifdef ROOTLESS
diff --git a/xorg-server/mi/mioverlay.c b/xorg-server/mi/mioverlay.c
index 7f502fa37..eb8dda133 100644
--- a/xorg-server/mi/mioverlay.c
+++ b/xorg-server/mi/mioverlay.c
@@ -79,7 +79,7 @@ static void miOverlayMarkUnrealizedWindow(WindowPtr, WindowPtr, Bool);
static int miOverlayValidateTree(WindowPtr, WindowPtr, VTKind);
static void miOverlayHandleExposures(WindowPtr);
static void miOverlayMoveWindow(WindowPtr, int, int, WindowPtr, VTKind);
-static void miOverlayWindowExposures(WindowPtr, RegionPtr, RegionPtr);
+static void miOverlayWindowExposures(WindowPtr, RegionPtr);
static void miOverlayResizeWindow(WindowPtr, int, int, unsigned int,
unsigned int, WindowPtr);
static void miOverlayClearToBackground(WindowPtr, int, int, int, int, Bool);
@@ -827,7 +827,7 @@ miOverlayHandleExposures(WindowPtr pWin)
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
WindowPtr pChild;
ValidatePtr val;
- void (*WindowExposures) (WindowPtr, RegionPtr, RegionPtr);
+ WindowExposuresProcPtr WindowExposures;
WindowExposures = pWin->drawable.pScreen->WindowExposures;
if (pPriv->underlayMarked) {
@@ -849,8 +849,7 @@ miOverlayHandleExposures(WindowPtr pWin)
}
RegionUninit(&mival->borderExposed);
- (*WindowExposures) (pTree->pWin, &mival->exposed,
- NullRegion);
+ (*WindowExposures) (pTree->pWin, &mival->exposed);
RegionUninit(&mival->exposed);
}
free(mival);
@@ -886,7 +885,7 @@ miOverlayHandleExposures(WindowPtr pWin)
if (RegionNotEmpty(&val->after.borderExposed)) {
miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER);
}
- (*WindowExposures) (pChild, &val->after.exposed, NullRegion);
+ (*WindowExposures) (pChild, &val->after.exposed);
}
RegionUninit(&val->after.borderExposed);
RegionUninit(&val->after.exposed);
@@ -980,42 +979,23 @@ miOverlayMoveWindow(WindowPtr pWin,
#endif
static void
-miOverlayWindowExposures(WindowPtr pWin,
- RegionPtr prgn, RegionPtr other_exposed)
+miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
{
RegionPtr exposures = prgn;
- if ((prgn && !RegionNil(prgn)) ||
- (exposures && !RegionNil(exposures)) || other_exposed) {
+ if (prgn && !RegionNil(prgn)) {
RegionRec expRec;
- int clientInterested;
-
- clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) &
- ExposureMask;
- if (other_exposed) {
- if (exposures) {
- RegionUnion(other_exposed, exposures, other_exposed);
- if (exposures != prgn)
- RegionDestroy(exposures);
- }
- exposures = other_exposed;
- }
- if (clientInterested && exposures &&
- (RegionNumRects(exposures) > RECTLIMIT)) {
+ int clientInterested =
+ (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask;
+ if (clientInterested && (RegionNumRects(prgn) > RECTLIMIT)) {
ScreenPtr pScreen = pWin->drawable.pScreen;
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
BoxRec box;
- box = *RegionExtents(exposures);
- if (exposures == prgn) {
- exposures = &expRec;
- RegionInit(exposures, &box, 1);
- RegionReset(prgn, &box);
- }
- else {
- RegionReset(exposures, &box);
- RegionUnion(prgn, prgn, exposures);
- }
+ box = *RegionExtents(prgn);
+ exposures = &expRec;
+ RegionInit(exposures, &box, 1);
+ RegionReset(prgn, &box);
/* This is the only reason why we are replacing mi's version
of this file */
@@ -1027,21 +1007,14 @@ miOverlayWindowExposures(WindowPtr pWin,
else
RegionIntersect(prgn, prgn, &pWin->clipList);
}
- if (prgn && !RegionNil(prgn))
- miPaintWindow(pWin, prgn, PW_BACKGROUND);
- if (clientInterested && exposures && !RegionNil(exposures))
+ miPaintWindow(pWin, prgn, PW_BACKGROUND);
+ if (clientInterested)
miSendExposures(pWin, exposures,
pWin->drawable.x, pWin->drawable.y);
- if (exposures == &expRec) {
+ if (exposures == &expRec)
RegionUninit(exposures);
- }
- else if (exposures && exposures != prgn && exposures != other_exposed)
- RegionDestroy(exposures);
- if (prgn)
- RegionEmpty(prgn);
+ RegionEmpty(prgn);
}
- else if (exposures && exposures != prgn)
- RegionDestroy(exposures);
}
typedef struct {
@@ -1491,11 +1464,7 @@ miOverlaySetShape(WindowPtr pWin, int kind)
if (WasViewable) {
(*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
-
(*pScreen->ValidateTree) (pWin->parent, NullWindow, VTOther);
- }
-
- if (WasViewable) {
(*pScreen->HandleExposures) (pWin->parent);
if (pScreen->PostValidateTree)
(*pScreen->PostValidateTree) (pWin->parent, NullWindow,
@@ -1592,7 +1561,6 @@ miOverlayClearToBackground(WindowPtr pWin,
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
BoxRec box;
RegionRec reg;
- RegionPtr pBSReg = NullRegion;
ScreenPtr pScreen = pWin->drawable.pScreen;
miOverlayScreenPtr pScreenPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
RegionPtr clipList;
@@ -1636,12 +1604,10 @@ miOverlayClearToBackground(WindowPtr pWin,
RegionIntersect(&reg, &reg, clipList);
if (generateExposures)
- (*pScreen->WindowExposures) (pWin, &reg, pBSReg);
+ (*pScreen->WindowExposures) (pWin, &reg);
else if (pWin->backgroundState != None)
miPaintWindow(pWin, &reg, PW_BACKGROUND);
RegionUninit(&reg);
- if (pBSReg)
- RegionDestroy(pBSReg);
}
/****************************************************************/
diff --git a/xorg-server/mi/miscrinit.c b/xorg-server/mi/miscrinit.c
index 00c15f713..327bd1540 100644
--- a/xorg-server/mi/miscrinit.c
+++ b/xorg-server/mi/miscrinit.c
@@ -259,13 +259,12 @@ miScreenInit(ScreenPtr pScreen, void *pbits, /* pointer to screen bits */
/* CreateColormap, DestroyColormap, InstallColormap, UninstallColormap */
/* ListInstalledColormaps, StoreColors, ResolveColor */
/* BitmapToRegion */
- pScreen->SendGraphicsExpose = miSendGraphicsExpose;
pScreen->BlockHandler = (ScreenBlockHandlerProcPtr) NoopDDA;
pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr) NoopDDA;
pScreen->MarkWindow = miMarkWindow;
pScreen->MarkOverlappedWindows = miMarkOverlappedWindows;
pScreen->MoveWindow = miMoveWindow;
- pScreen->ResizeWindow = miSlideAndSizeWindow;
+ pScreen->ResizeWindow = miResizeWindow;
pScreen->GetLayerWindow = miGetLayerWindow;
pScreen->HandleExposures = miHandleValidateExposures;
pScreen->ReparentWindow = (ReparentWindowProcPtr) 0;
diff --git a/xorg-server/mi/mivaltree.c b/xorg-server/mi/mivaltree.c
index c1cc43122..8e4e9a9e0 100644
--- a/xorg-server/mi/mivaltree.c
+++ b/xorg-server/mi/mivaltree.c
@@ -99,8 +99,10 @@ Equipment Corporation.
#include "mi.h"
#include "regionstr.h"
#include "mivalidate.h"
-
#include "globals.h"
+#ifdef COMPOSITE
+#include "compint.h"
+#endif
/*
* Compute the visibility of a shaped window
@@ -160,17 +162,6 @@ miShapedWindowIn(RegionPtr universe, RegionPtr bounding,
return rgnOUT;
}
-static GetRedirectBorderClipProcPtr miGetRedirectBorderClipProc;
-static SetRedirectBorderClipProcPtr miSetRedirectBorderClipProc;
-
-void
-miRegisterRedirectBorderClipProc(SetRedirectBorderClipProcPtr setBorderClip,
- GetRedirectBorderClipProcPtr getBorderClip)
-{
- miSetRedirectBorderClipProc = setBorderClip;
- miGetRedirectBorderClipProc = getBorderClip;
-}
-
/*
* Manual redirected windows are treated as transparent; they do not obscure
* siblings or parent windows
@@ -242,11 +233,9 @@ miComputeClips(WindowPtr pParent,
* In redirected drawing case, reset universe to borderSize
*/
if (pParent->redirectDraw != RedirectDrawNone) {
- if (miSetRedirectBorderClipProc) {
- if (TreatAsTransparent(pParent))
- RegionEmpty(universe);
- (*miSetRedirectBorderClipProc) (pParent, universe);
- }
+ if (TreatAsTransparent(pParent))
+ RegionEmpty(universe);
+ compSetRedirectBorderClip (pParent, universe);
RegionCopy(universe, &pParent->borderSize);
}
#endif
@@ -516,6 +505,17 @@ miTreeObscured(WindowPtr pParent)
}
}
+static RegionPtr
+getBorderClip(WindowPtr pWin)
+{
+#ifdef COMPOSITE
+ if (pWin->redirectDraw != RedirectDrawNone)
+ return compGetRedirectBorderClip(pWin);
+ else
+#endif
+ return &pWin->borderClip;
+}
+
/*
*-----------------------------------------------------------------------
* miValidateTree --
@@ -609,14 +609,7 @@ miValidateTree(WindowPtr pParent, /* Parent to validate */
forward = TRUE;
for (pWin = pChild; pWin; pWin = pWin->nextSib) {
if (pWin->valdata) {
- RegionPtr pBorderClip = &pWin->borderClip;
-
-#ifdef COMPOSITE
- if (pWin->redirectDraw != RedirectDrawNone &&
- miGetRedirectBorderClipProc)
- pBorderClip = (*miGetRedirectBorderClipProc) (pWin);
-#endif
- RegionAppend(&totalClip, pBorderClip);
+ RegionAppend(&totalClip, getBorderClip(pWin));
if (pWin->viewable)
viewvals++;
}
@@ -627,14 +620,7 @@ miValidateTree(WindowPtr pParent, /* Parent to validate */
pWin = pParent->lastChild;
while (1) {
if (pWin->valdata) {
- RegionPtr pBorderClip = &pWin->borderClip;
-
-#ifdef COMPOSITE
- if (pWin->redirectDraw != RedirectDrawNone &&
- miGetRedirectBorderClipProc)
- pBorderClip = (*miGetRedirectBorderClipProc) (pWin);
-#endif
- RegionAppend(&totalClip, pBorderClip);
+ RegionAppend(&totalClip, getBorderClip(pWin));
if (pWin->viewable)
viewvals++;
}
diff --git a/xorg-server/mi/miwindow.c b/xorg-server/mi/miwindow.c
index 82c3513c8..0cf50465a 100644
--- a/xorg-server/mi/miwindow.c
+++ b/xorg-server/mi/miwindow.c
@@ -111,7 +111,7 @@ miClearToBackground(WindowPtr pWin,
RegionIntersect(&reg, &reg, &pWin->clipList);
if (generateExposures)
- (*pWin->drawable.pScreen->WindowExposures) (pWin, &reg, NULL);
+ (*pWin->drawable.pScreen->WindowExposures) (pWin, &reg);
else if (pWin->backgroundState != None)
miPaintWindow(pWin, &reg, PW_BACKGROUND);
RegionUninit(&reg);
@@ -221,7 +221,7 @@ miHandleValidateExposures(WindowPtr pWin)
if (RegionNotEmpty(&val->after.borderExposed))
miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER);
RegionUninit(&val->after.borderExposed);
- (*WindowExposures) (pChild, &val->after.exposed, NullRegion);
+ (*WindowExposures) (pChild, &val->after.exposed);
RegionUninit(&val->after.exposed);
free(val);
pChild->valdata = NULL;
@@ -292,9 +292,9 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
RegionDestroy(oldRegion);
/* XXX need to retile border if ParentRelative origin */
(*pScreen->HandleExposures) (pLayerWin->parent);
+ if (pScreen->PostValidateTree)
+ (*pScreen->PostValidateTree) (pLayerWin->parent, NULL, kind);
}
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pLayerWin->parent, NullWindow, kind);
}
if (pWin->realized)
WindowsRestructured();
@@ -337,9 +337,8 @@ miRecomputeExposures(WindowPtr pWin, void *value)
}
void
-miSlideAndSizeWindow(WindowPtr pWin,
- int x, int y,
- unsigned int w, unsigned int h, WindowPtr pSib)
+miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
+ WindowPtr pSib)
{
WindowPtr pParent;
Bool WasViewable = (Bool) (pWin->viewable);
@@ -608,11 +607,12 @@ miSlideAndSizeWindow(WindowPtr pWin,
RegionDestroy(pRegion);
if (destClip)
RegionDestroy(destClip);
- if (anyMarked)
+ if (anyMarked) {
(*pScreen->HandleExposures) (pLayerWin->parent);
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
- VTOther);
+ if (pScreen->PostValidateTree)
+ (*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
+ VTOther);
+ }
}
if (pWin->realized)
WindowsRestructured();
@@ -664,17 +664,14 @@ miSetShape(WindowPtr pWin, int kind)
if (WasViewable) {
anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
- if (anyMarked)
+ if (anyMarked) {
(*pScreen->ValidateTree) (pLayerWin->parent, NullWindow,
VTOther);
- }
-
- if (WasViewable) {
- if (anyMarked)
(*pScreen->HandleExposures) (pLayerWin->parent);
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pLayerWin->parent, NullWindow,
- VTOther);
+ if (pScreen->PostValidateTree)
+ (*pScreen->PostValidateTree) (pLayerWin->parent, NULL,
+ VTOther);
+ }
}
}
if (pWin->realized)
@@ -726,10 +723,10 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
if (anyMarked) {
(*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTOther);
(*pScreen->HandleExposures) (pLayerWin->parent);
+ if (pScreen->PostValidateTree)
+ (*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin,
+ VTOther);
}
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin,
- VTOther);
}
if (pWin->realized)
WindowsRestructured();