Bugfix: Don’t set the layout when it’s default layout anyways
Fixes some nasty side-effects
This commit is contained in:
parent
c3b4006f6b
commit
02acf426d3
|
@ -60,8 +60,11 @@ Con *con_new(Con *parent) {
|
||||||
TAILQ_INIT(&(new->swallow_head));
|
TAILQ_INIT(&(new->swallow_head));
|
||||||
|
|
||||||
if (parent != NULL) {
|
if (parent != NULL) {
|
||||||
/* Set layout of ws if this is the first child of the ws. */
|
/* Set layout of ws if this is the first child of the ws and the user
|
||||||
if (parent->type == CT_WORKSPACE && con_is_leaf(parent)) {
|
* wanted something different than the default layout. */
|
||||||
|
if (parent->type == CT_WORKSPACE &&
|
||||||
|
con_is_leaf(parent) &&
|
||||||
|
config.default_layout != L_DEFAULT) {
|
||||||
con_set_layout(new, config.default_layout);
|
con_set_layout(new, config.default_layout);
|
||||||
con_attach(new, parent, false);
|
con_attach(new, parent, false);
|
||||||
con_set_layout(parent, config.default_layout);
|
con_set_layout(parent, config.default_layout);
|
||||||
|
|
Loading…
Reference in New Issue