Darwin: More syncing witn xorg-server-1.2-apple

This commit is contained in:
Jeremy Huddleston 2007-11-22 13:17:44 -08:00
commit 23596291c3
3 changed files with 49 additions and 24 deletions

View file

@ -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)