Allow changing the layout of workspaces by storing it (Thanks mhcerri)
Before commit 4976fa3350
, setting the
layout of workspaces to something else than the default would just mess
up the parent container of the workspace (the content container).
After that commit, it would create an unnecessary split container when
you change the layout _before_ opening any containers. To avoid this, we
now store the layout (similar to how the 'workspace_layout'
configuration directive works) and apply it when the first container is
attached to the workspace.
Fixes #796
This commit is contained in:
17
src/ipc.c
17
src/ipc.c
@ -231,6 +231,23 @@ void dump_node(yajl_gen gen, struct Con *con, bool inplace_restart) {
|
||||
break;
|
||||
}
|
||||
|
||||
ystr("workspace_layout");
|
||||
switch (con->workspace_layout) {
|
||||
case L_DEFAULT:
|
||||
ystr("default");
|
||||
break;
|
||||
case L_STACKED:
|
||||
ystr("stacked");
|
||||
break;
|
||||
case L_TABBED:
|
||||
ystr("tabbed");
|
||||
break;
|
||||
default:
|
||||
DLOG("About to dump workspace_layout=%d (none of default/stacked/tabbed), this is a bug.\n", con->workspace_layout);
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
|
||||
ystr("last_split_layout");
|
||||
switch (con->layout) {
|
||||
case L_SPLITV:
|
||||
|
Reference in New Issue
Block a user