Fix problems with floating windows

Makes any tabbed/stacked layout a container to separate from floating
windows which may be attached to a workspace.
This commit is contained in:
Mikkel Oscar Lyderik 2016-04-01 13:36:36 +02:00
parent ec7ff769c7
commit 8d700fe008
6 changed files with 26 additions and 7 deletions

View file

@ -1764,8 +1764,16 @@ static struct cmd_results *cmd_layout(int argc, char **argv) {
// cmd_workspace_layout
parent->layout = L_HORIZ;
} else if (strcasecmp(argv[0], "tabbed") == 0) {
if (parent->type != C_CONTAINER) {
parent = new_container(parent, L_TABBED);
}
parent->layout = L_TABBED;
} else if (strcasecmp(argv[0], "stacking") == 0) {
if (parent->type != C_CONTAINER) {
parent = new_container(parent, L_STACKED);
}
parent->layout = L_STACKED;
} else if (strcasecmp(argv[0], "splith") == 0) {
parent->layout = L_HORIZ;