From 02acf426d316a7e62262d97434c76a46e6c63307 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 2 Apr 2011 22:08:19 +0200 Subject: [PATCH] =?UTF-8?q?Bugfix:=20Don=E2=80=99t=20set=20the=20layout=20?= =?UTF-8?q?when=20it=E2=80=99s=20default=20layout=20anyways?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes some nasty side-effects --- src/con.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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);