summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2010-12-07 17:08:11 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2010-12-07 17:08:11 +0800
commita0052077cdde92db651b1ed0923281f3c98e201a (patch)
treea9711e4afe6881cafbfedebe91cd78ddc4e50195 /src
parent16e02c0c4ab78b2d5a9481b8fb4544201346166d (diff)
downloadcompiz-with-glib-mainloop-a0052077cdde92db651b1ed0923281f3c98e201a.tar.gz
compiz-with-glib-mainloop-a0052077cdde92db651b1ed0923281f3c98e201a.tar.bz2
Make sure findValidStackSibling below doesn't return a sibling that
we're not allowed to stack under. Forward port 1baf514fefb9177764af99cf508596686583244e to master
Diffstat (limited to 'src')
-rw-r--r--src/window.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 6f54095..e39c205 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -3192,6 +3192,21 @@ PrivateWindow::findValidStackSiblingBelow (CompWindow *w,
{
CompWindow *lowest, *last, *p;
+ /* check whether we're allowed to stack under a sibling by finding
+ * the above 'sibling' and checking whether or not we're allowed
+ * to stack under that - if not, then there is no valid sibling
+ * underneath it */
+
+ for (p = sibling->next; p; p = p->next)
+ {
+ if (!avoidStackingRelativeTo (p))
+ {
+ if (!validSiblingBelow (sibling, w))
+ return NULL;
+ break;
+ }
+ }
+
/* get lowest sibling we're allowed to stack above */
lowest = last = findLowestSiblingBelow (w);