mirror of
https://github.com/swaywm/sway.git
synced 2026-05-26 21:38:40 -04:00
tree/workspace: fix unwrapping children to avoid redundant split
Before this change, with `workspace_layout tabbed`, moving T[app app] to an empty workspace resulted in T[T[app] T[app]], as each child was individually wrapped in a new split container. It looks like commit92891fb1introduced workspace_unwrap_children to fix an issue where moving a tabbed/stacked container to a new workspace with workspace_layout tabbed would incorrectly nest the container, creating T[T[app app]]. However, workspace_unwrap_children used workspace_add_tiling to add the detached children to the workspace. Since commitece6a1d4, workspace_add_tiling checks for a configured default_layout and if it finds one, calls container_split for every added window. This commit changes the unwrapping logic to use workspace_insert_tiling_direct instead of workspace_add_tiling, avoiding the default_layout splitting behaviour.
This commit is contained in:
parent
e52c14d535
commit
abb959602f
1 changed files with 1 additions and 1 deletions
|
|
@ -920,7 +920,7 @@ void workspace_unwrap_children(struct sway_workspace *ws,
|
|||
while (wrap->pending.children->length) {
|
||||
struct sway_container *child = wrap->pending.children->items[0];
|
||||
container_detach(child);
|
||||
workspace_add_tiling(ws, child);
|
||||
workspace_insert_tiling_direct(ws, child, ws->tiling->length);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue