From: Michael Stapelberg Date: Sat, 2 Apr 2011 20:08:19 +0000 (+0200) Subject: Bugfix: Don’t set the layout when it’s default layout anyways X-Git-Tag: tree-pr3~78 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=02acf426d316a7e62262d97434c76a46e6c63307;p=i3%2Fi3 Bugfix: Don’t set the layout when it’s default layout anyways Fixes some nasty side-effects --- diff --git a/src/con.c b/src/con.c index 07406d8d..806d0b29 100644 --- a/src/con.c +++ b/src/con.c @@ -60,8 +60,11 @@ Con *con_new(Con *parent) { TAILQ_INIT(&(new->swallow_head)); if (parent != NULL) { - /* Set layout of ws if this is the first child of the ws. */ - if (parent->type == CT_WORKSPACE && con_is_leaf(parent)) { + /* Set layout of ws if this is the first child of the ws and the user + * 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_attach(new, parent, false); con_set_layout(parent, config.default_layout);