mirror of
https://github.com/swaywm/sway.git
synced 2024-12-29 16:36:26 +01:00
Fix splitting workspaces
This commit is contained in:
parent
efac07db5f
commit
a06052ad9d
1 changed files with 8 additions and 0 deletions
|
@ -951,6 +951,14 @@ struct sway_container *container_split(struct sway_container *child,
|
|||
if (!sway_assert(child, "child cannot be null")) {
|
||||
return NULL;
|
||||
}
|
||||
if (child->type == C_WORKSPACE && child->children->length == 0) {
|
||||
// Special case: this just behaves like splitt
|
||||
child->prev_layout = child->layout;
|
||||
child->layout = layout;
|
||||
arrange_windows(child, -1, -1);
|
||||
return child;
|
||||
}
|
||||
|
||||
struct sway_container *cont = container_create(C_CONTAINER);
|
||||
|
||||
wlr_log(L_DEBUG, "creating container %p around %p", cont, child);
|
||||
|
|
Loading…
Reference in a new issue