diff --git a/dix/window.c b/dix/window.c index f4ace76c7f4cd7a44f2bdd5b20e7355b7c9439af..ec94a8843e664f79800a18733293c41104539375 100644 --- a/dix/window.c +++ b/dix/window.c @@ -2856,13 +2856,11 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure) pWin->mapped = FALSE; if (wasRealized) UnrealizeTree(pWin, fromConfigure); - if (wasViewable) { - if (!fromConfigure) { - (*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap); - (*pScreen->HandleExposures) (pLayerWin->parent); - if (pScreen->PostValidateTree) - (*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap); - } + if (wasViewable && !fromConfigure) { + (*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap); + (*pScreen->HandleExposures) (pLayerWin->parent); + if (pScreen->PostValidateTree) + (*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap); } if (wasRealized && !fromConfigure) { WindowsRestructured(); @@ -2909,31 +2907,28 @@ UnmapSubwindows(WindowPtr pWin) UnrealizeTree(pChild, FALSE); } } - if (wasViewable) { - if (anyMarked) { - if (pLayerWin->parent == pWin) - (*pScreen->MarkWindow) (pWin); - else { - WindowPtr ptmp; + if (wasViewable && anyMarked) { + if (pLayerWin->parent == pWin) + (*pScreen->MarkWindow) (pWin); + else { + WindowPtr ptmp; - (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, NULL); - (*pScreen->MarkWindow) (pLayerWin->parent); + (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, NULL); + (*pScreen->MarkWindow) (pLayerWin->parent); - /* Windows between pWin and pLayerWin may not have been marked */ - ptmp = pWin; + /* Windows between pWin and pLayerWin may not have been marked */ + ptmp = pWin; - while (ptmp != pLayerWin->parent) { - (*pScreen->MarkWindow) (ptmp); - ptmp = ptmp->parent; - } - pHead = pWin->firstChild; + while (ptmp != pLayerWin->parent) { + (*pScreen->MarkWindow) (ptmp); + ptmp = ptmp->parent; } - (*pScreen->ValidateTree) (pLayerWin->parent, pHead, VTUnmap); - (*pScreen->HandleExposures) (pLayerWin->parent); - if (pScreen->PostValidateTree) - (*pScreen->PostValidateTree) (pLayerWin->parent, pHead, - VTUnmap); + pHead = pWin->firstChild; } + (*pScreen->ValidateTree) (pLayerWin->parent, pHead, VTUnmap); + (*pScreen->HandleExposures) (pLayerWin->parent); + if (pScreen->PostValidateTree) + (*pScreen->PostValidateTree) (pLayerWin->parent, pHead, VTUnmap); } if (wasRealized) { WindowsRestructured(); diff --git a/mi/mibitblt.c b/mi/mibitblt.c index 43d9bd9179d2658af8f2da4878a9482ab3767ac5..4f7e291701775774a34ea46d0a9f57767dfa8b4a 100644 --- a/mi/mibitblt.c +++ b/mi/mibitblt.c @@ -92,9 +92,9 @@ miCopyArea(DrawablePtr pSrcDrawable, srcx = xIn + pSrcDrawable->x; srcy = yIn + pSrcDrawable->y; - /* If the destination isn't realized, this is easy */ + /* If the destination is clipped away, this is easy */ if (pDstDrawable->type == DRAWABLE_WINDOW && - !((WindowPtr) pDstDrawable)->realized) + RegionNil(&((WindowPtr)pDstDrawable)->clipList)) return NULL; /* clip the source */ diff --git a/mi/micopy.c b/mi/micopy.c index 12cdad4ad5830fb916833f6894a21e54c389df92..4db128c4fdb762663d69aee8d9c12ddafd59d6bd 100644 --- a/mi/micopy.c +++ b/mi/micopy.c @@ -152,10 +152,9 @@ miDoCopy(DrawablePtr pSrcDrawable, Bool fastDst = FALSE; /* for fast clipping with one rect dest */ Bool fastExpose = FALSE; /* for fast exposures with pixmap source */ - /* Short cut for unmapped windows */ - + /* Short cut for unmapped or fully clipped windows */ if (pDstDrawable->type == DRAWABLE_WINDOW && - !((WindowPtr) pDstDrawable)->realized) { + RegionNil(&((WindowPtr)pDstDrawable)->clipList)) { return NULL; }