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.
This commit is contained in:
parent
715fe580af
commit
26ab2ac008
|
@ -129,7 +129,9 @@ void con_attach(Con *con, Con *parent, bool ignore_focus) {
|
||||||
* workspace or a new split container with the configured
|
* workspace or a new split container with the configured
|
||||||
* workspace_layout).
|
* 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");
|
DLOG("Parent is a workspace. Applying default layout...\n");
|
||||||
Con *target = workspace_attach_to(parent);
|
Con *target = workspace_attach_to(parent);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue