[fusion-commits] compiz mirror: Changes to 'master' (5f7dbdb3f51df5b9fee2eef6307846e05d651cb2)

compiz at server.beryl-project.org compiz at server.beryl-project.org
Fri Jul 27 19:54:06 CEST 2007


New commits:
commit 5f7dbdb3f51df5b9fee2eef6307846e05d651cb2
Merge: 651f5d55c078fc7963e12208e2c84d3e0352c1fe 2784e1519857e77fa6d4c925cae9e0b7be87b5a4
Author: David Reveman <davidr at novell.com>
Date:   Fri Jul 27 13:43:45 2007 -0400

    Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/app/compiz

commit 651f5d55c078fc7963e12208e2c84d3e0352c1fe
Author: David Reveman <davidr at novell.com>
Date:   Fri Jul 27 13:22:45 2007 -0400

    Skip windows that we should avoid stacking relative to.


 src/window.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)


Modified: compiz/src/window.c
===================================================================
--- compiz/src/window.c
+++ compiz/src/window.c
@@ -3813,10 +3813,10 @@ void
 restackWindowBelow (CompWindow *w,
 		    CompWindow *sibling)
 {
-    CompWindow *lowest, *p;
+    CompWindow *lowest, *last, *p;
 
     /* get lowest sibling we're allowed to stack above */
-    lowest = findLowestSiblingBelow (w);
+    lowest = last = findLowestSiblingBelow (w);
 
     /* walk from bottom up */
     for (p = w->screen->windows; p; p = p->next)
@@ -3835,14 +3835,22 @@ restackWindowBelow (CompWindow *w,
 	    return;
 	}
 
+	/* skip windows that we should avoid */
+	if (avoidStackingRelativeTo (p))
+	    continue;
+
 	if (validSiblingBelow (w, p))
 	{
 	    /* update lowest as we find windows below sibling that we're
-	       allowed to stack above but also make sure that we were allowed
-	       to stack above the previous window */
-	    if (p->prev == lowest)
+	       allowed to stack above. last window must be equal to the
+	       lowest as we shouldn't update lowest if we passed an
+	       invalid window */
+	    if (last == lowest)
 		lowest = p;
 	}
+
+	/* update last pointer */
+	last = p;
     }
 }
 


More information about the commits mailing list