mirror of
https://github.com/swaywm/sway.git
synced 2026-06-13 14:33:19 -04:00
tree/load_layout: bypass default_layout when appending
workspace_add_tiling wraps each top-level container with container_split when config->default_layout is set, mutating restored layouts. Use workspace_insert_tiling_direct so the parsed subtree is attached as-is.
This commit is contained in:
parent
b1ad1b3df3
commit
bc357224b8
1 changed files with 4 additions and 1 deletions
|
|
@ -446,8 +446,11 @@ bool load_layout_from_file(struct sway_workspace *ws, const char *path,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// workspace_add_tiling would wrap each child with container_split when
|
||||||
|
// default_layout is set, which mutates the parsed tree.
|
||||||
for (int i = 0; i < children->length; i++) {
|
for (int i = 0; i < children->length; i++) {
|
||||||
workspace_add_tiling(ws, children->items[i]);
|
workspace_insert_tiling_direct(ws, children->items[i],
|
||||||
|
ws->tiling->length);
|
||||||
}
|
}
|
||||||
list_free(children);
|
list_free(children);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue