mirror of
https://github.com/swaywm/sway.git
synced 2025-11-17 06:59:48 -05:00
commands: fix layout implementation (also better name for previous split layout)
This commit is contained in:
parent
3a980857cb
commit
356063b6c0
4 changed files with 30 additions and 21 deletions
|
|
@ -859,7 +859,7 @@ struct sway_container *container_split(struct sway_container *child,
|
|||
}
|
||||
if (child->type == C_WORKSPACE && child->children->length == 0) {
|
||||
// Special case: this just behaves like splitt
|
||||
child->prev_layout = child->layout;
|
||||
child->prev_split_layout = child->layout;
|
||||
child->layout = layout;
|
||||
return child;
|
||||
}
|
||||
|
|
@ -870,7 +870,7 @@ struct sway_container *container_split(struct sway_container *child,
|
|||
|
||||
remove_gaps(child);
|
||||
|
||||
cont->prev_layout = L_NONE;
|
||||
cont->prev_split_layout = L_NONE;
|
||||
cont->width = child->width;
|
||||
cont->height = child->height;
|
||||
cont->x = child->x;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ struct sway_container *workspace_create(struct sway_container *output,
|
|||
workspace->width = output->width;
|
||||
workspace->height = output->height;
|
||||
workspace->name = !name ? NULL : strdup(name);
|
||||
workspace->prev_layout = L_NONE;
|
||||
workspace->prev_split_layout = L_NONE;
|
||||
workspace->layout = container_get_default_layout(output);
|
||||
|
||||
struct sway_workspace *swayws = calloc(1, sizeof(struct sway_workspace));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue