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

compiz at server.beryl-project.org compiz at server.beryl-project.org
Thu Jul 26 22:12:05 CEST 2007


New commits:
commit d17c177c7a944d277941d19d6977414d974b4b29
Author: David Reveman <davidr at novell.com>
Date:   Thu Jul 26 15:43:20 2007 -0400

    Make sure restackWindowBelow is able to put a window at
    the bottom of the stack and that it never stacks a window
    above the specified sibling.


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


Modified: compiz/src/window.c
===================================================================
--- compiz/src/window.c
+++ compiz/src/window.c
@@ -3821,27 +3821,28 @@ restackWindowBelow (CompWindow *w,
     /* walk from bottom up */
     for (p = w->screen->windows; p; p = p->next)
     {
-	/* stop walking whe we reach the sibling we should try to stack below */
+	/* stop walking when we reach the sibling we should try to stack
+	   below */
 	if (p == sibling)
-	    break;
+	{
+	    XWindowChanges xwc;
+	    int		   mask;
 
-	if (!validSiblingBelow (w, p))
-	    break;
+	    mask = addWindowStackChanges (w, &xwc, lowest);
+	    if (mask)
+		configureXWindow (w, mask, &xwc);
 
-	/* update lowest as we find windows below sibling that we're allowed
-	   to stack above */
-	if (p->prev == lowest)
-	    lowest = p;
-    }
-
-    if (lowest)
-    {
-	XWindowChanges xwc;
-	int	       mask;
+	    return;
+	}
 
-	mask = addWindowStackChanges (w, &xwc, lowest);
-	if (mask)
-	    configureXWindow (w, mask, &xwc);
+	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)
+		lowest = p;
+	}
     }
 }
 


More information about the commits mailing list