Merge pull request #2033 from RyanDwyer/arrange-after-flatten

Arrange views after flattening the parent
This commit is contained in:
Drew DeVault 2018-05-25 08:43:57 -04:00 committed by GitHub
commit daf328d054
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -327,9 +327,11 @@ void container_move(struct sway_container *container,
current = container_parent(container, C_OUTPUT); 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 // Special case: we were the last one in this container, so flatten it
// and leave // and leave
arrange_children_of(new_parent);
update_debug_tree(); update_debug_tree();
return; return;
} }