[PATCH 10/18] mi: Remove a can't-happen from miValidateTree
Adam Jackson
ajax at redhat.com
Tue Sep 23 11:32:26 PDT 2014
The only way you can get VisibilityNotViewable is to be, you know, not
viewable. Since this test is inside if (pWin->viewable)...
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
mi/mivaltree.c | 30 ------------------------------
1 file changed, 30 deletions(-)
diff --git a/mi/mivaltree.c b/mi/mivaltree.c
index 8e4e9a9..b1caec9 100644
--- a/mi/mivaltree.c
+++ b/mi/mivaltree.c
@@ -478,33 +478,6 @@ miComputeClips(WindowPtr pParent,
(*pScreen->ClipNotify) (pParent, dx, dy);
}
-static void
-miTreeObscured(WindowPtr pParent)
-{
- WindowPtr pChild;
- int oldVis;
-
- pChild = pParent;
- while (1) {
- if (pChild->viewable) {
- oldVis = pChild->visibility;
- if (oldVis != (pChild->visibility = VisibilityFullyObscured) &&
- ((pChild->
- eventMask | wOtherEventMasks(pChild)) & VisibilityChangeMask))
- SendVisibilityNotify(pChild);
- if (pChild->firstChild) {
- pChild = pChild->firstChild;
- continue;
- }
- }
- while (!pChild->nextSib && (pChild != pParent))
- pChild = pChild->parent;
- if (pChild == pParent)
- break;
- pChild = pChild->nextSib;
- }
-}
-
static RegionPtr
getBorderClip(WindowPtr pWin)
{
@@ -683,9 +656,6 @@ miValidateTree(WindowPtr pParent, /* Parent to validate */
RegionSubtract(&totalClip, &totalClip, &pWin->borderSize);
}
}
- else if (pWin->visibility == VisibilityNotViewable) {
- miTreeObscured(pWin);
- }
}
else {
if (pWin->valdata) {
--
1.9.3
More information about the xorg-devel
mailing list