mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
Fix tabbed/stacked corner case #742
Tabbed/stacked containers are now created only if a view is present on the workspace. If a view is created on previously empty tabbed/stacked workspace, it gets wrapped in a container.
This commit is contained in:
parent
378149b59c
commit
ee67cd0ba1
4 changed files with 22 additions and 3 deletions
|
|
@ -1950,13 +1950,13 @@ static struct cmd_results *cmd_layout(int argc, char **argv) {
|
|||
}
|
||||
|
||||
if (strcasecmp(argv[0], "tabbed") == 0) {
|
||||
if (parent->type != C_CONTAINER) {
|
||||
if (parent->type != C_CONTAINER && !swayc_is_empty_workspace(parent)){
|
||||
parent = new_container(parent, L_TABBED);
|
||||
}
|
||||
|
||||
parent->layout = L_TABBED;
|
||||
} else if (strcasecmp(argv[0], "stacking") == 0) {
|
||||
if (parent->type != C_CONTAINER) {
|
||||
if (parent->type != C_CONTAINER && !swayc_is_empty_workspace(parent)) {
|
||||
parent = new_container(parent, L_STACKED);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue