aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/tree/layout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 91759f7b..cf16d5c5 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -327,9 +327,11 @@ void container_move(struct sway_container *container,
current = container_parent(container, C_OUTPUT);
}
- if (parent != container_flatten(parent)) {
+ struct sway_container *new_parent = container_flatten(parent);
+ if (new_parent != parent) {
// Special case: we were the last one in this container, so flatten it
// and leave
+ arrange_children_of(new_parent);
update_debug_tree();
return;
}