mirror of
https://github.com/swaywm/sway.git
synced 2026-04-23 06:46:27 -04:00
Flatten redundant splits after deleting nodes
commit 0fc7afdfc875764d12549f711a49bd63a98776ce
Author: Kogasa <kogasapls@gmail.com>
Date: Mon May 2 12:31:15 2022 -0500
aa
This commit is contained in:
parent
a7898637de
commit
6125996caf
1 changed files with 4 additions and 0 deletions
|
|
@ -1505,6 +1505,10 @@ void container_detach(struct sway_container *child) {
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
list_del(siblings, index);
|
list_del(siblings, index);
|
||||||
}
|
}
|
||||||
|
// if con has one sibling which is split, deleting con leaves redundant splits. squash them
|
||||||
|
if (siblings->length == 1 && old_parent) {
|
||||||
|
container_flatten(old_parent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
child->pending.parent = NULL;
|
child->pending.parent = NULL;
|
||||||
child->pending.workspace = NULL;
|
child->pending.workspace = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue