From 26ab2ac008bc48734f4e3a5caab9c9f2f8c447e8 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 8 Nov 2011 20:37:24 +0000 Subject: [PATCH] Bugfix: Insert container at the correct position on workspace-level when workspace_layout == default MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes #533 The problem was that the code was always executed. While it *attaches* the new container to the workspace container, it also sets current = NULL and thus always appends the container instead of inserting it after the currently focused child. So now, we just don’t execute that code at all for workspace_layout == default. --- src/con.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/con.c b/src/con.c index 04605689..ee84467b 100644 --- a/src/con.c +++ b/src/con.c @@ -129,7 +129,9 @@ void con_attach(Con *con, Con *parent, bool ignore_focus) { * workspace or a new split container with the configured * workspace_layout). */ - if (con->window != NULL && parent->type == CT_WORKSPACE) { + if (con->window != NULL && + parent->type == CT_WORKSPACE && + config.default_layout != L_DEFAULT) { DLOG("Parent is a workspace. Applying default layout...\n"); Con *target = workspace_attach_to(parent); -- 2.39.2