[PATCH 11/18] mi: Rewrite a conditional chain to be a bit more obvious

Adam Jackson ajax at redhat.com
Tue Sep 23 11:32:27 PDT 2014


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 mi/mivaltree.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/mi/mivaltree.c b/mi/mivaltree.c
index b1caec9..1b68739 100644
--- a/mi/mivaltree.c
+++ b/mi/mivaltree.c
@@ -648,17 +648,15 @@ miValidateTree(WindowPtr pParent,       /* Parent to validate */
     }
 
     for (pWin = pChild; pWin != NullWindow; pWin = pWin->nextSib) {
-        if (pWin->viewable) {
-            if (pWin->valdata) {
+        if (pWin->valdata) {
+            if (pWin->viewable) {
                 RegionIntersect(&childClip, &totalClip, &pWin->borderSize);
                 miComputeClips(pWin, pScreen, &childClip, kind, &exposed);
                 if (overlap && !TreatAsTransparent(pWin)) {
                     RegionSubtract(&totalClip, &totalClip, &pWin->borderSize);
                 }
             }
-        }
-        else {
-            if (pWin->valdata) {
+            else {
                 RegionEmpty(&pWin->clipList);
                 if (pScreen->ClipNotify)
                     (*pScreen->ClipNotify) (pWin, 0, 0);
-- 
1.9.3



More information about the xorg-devel mailing list