summaryrefslogtreecommitdiff
path: root/hw/darwin/darwin.c
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremy@tifa.local>2007-11-22 13:17:44 -0800
committerJeremy Huddleston <jeremy@tifa.local>2007-11-22 13:17:44 -0800
commit23596291c30a85e38c00aef2c01b46d561e2916e (patch)
treea6973e64252c96ef0143d94e6c3957b3095b0d5d /hw/darwin/darwin.c
parent4e18c626350c7c2e0fb540aa64a98957699f3abe (diff)
Darwin: More syncing witn xorg-server-1.2-apple
Diffstat (limited to 'hw/darwin/darwin.c')
-rw-r--r--hw/darwin/darwin.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c
index a772218fe..b08770c10 100644
--- a/hw/darwin/darwin.c
+++ b/hw/darwin/darwin.c
@@ -671,6 +671,7 @@ void OsVendorInit(void)
}
#endif
}
+ // DEBUG_LOG("Xquartz started at %s\n", ctime(time(NULL)));
// Find the full path to the keymapping file.
if ( darwinKeymapFile ) {
@@ -959,7 +960,7 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable)
WindowPtr pChild;
Bool WasViewable = (Bool)(pWin->viewable);
Bool anyMarked = TRUE;
- RegionPtr pOldClip = NULL;
+ RegionPtr pOldClip = NULL, bsExposed;
#ifdef DO_SAVE_UNDERS
Bool dosave = FALSE;
#endif
@@ -1015,6 +1016,12 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable)
if (WasViewable)
{
+ if (pWin->backStorage)
+ {
+ pOldClip = REGION_CREATE(pScreen, NullBox, 1);
+ REGION_COPY(pScreen, pOldClip, &pWin->clipList);
+ }
+
if (pWin->firstChild)
{
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
@@ -1038,6 +1045,28 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable)
(*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
}
+ if (pWin->backStorage &&
+ ((pWin->backingStore == Always) || WasViewable))
+ {
+ if (!WasViewable)
+ pOldClip = &pWin->clipList; /* a convenient empty region */
+ bsExposed = (*pScreen->TranslateBackingStore)
+ (pWin, 0, 0, pOldClip,
+ pWin->drawable.x, pWin->drawable.y);
+ if (WasViewable)
+ REGION_DESTROY(pScreen, pOldClip);
+ if (bsExposed)
+ {
+ RegionPtr valExposed = NullRegion;
+
+ if (pWin->valdata)
+ valExposed = &pWin->valdata->after.exposed;
+ (*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
+ if (valExposed)
+ REGION_EMPTY(pScreen, valExposed);
+ REGION_DESTROY(pScreen, bsExposed);
+ }
+ }
if (WasViewable)
{
if (anyMarked)