From: Michael Stapelberg Date: Tue, 8 Nov 2011 20:37:24 +0000 (+0000) Subject: Bugfix: Insert container at the correct position on workspace-level when workspace_la... X-Git-Tag: 4.1~23 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=26ab2ac008bc48734f4e3a5caab9c9f2f8c447e8;p=i3%2Fi3 Bugfix: Insert container at the correct position on workspace-level when workspace_layout == default 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. --- 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);