Bugfix: Attach new cons at the correct place when a floating con is focused (+test) (Thanks fernandotcl)
New containers were previously attached directly to the workspace instead of to the previously focused place in the workspace (for example a stacked con). Fixes: #376
This commit is contained in:
10
src/tree.c
10
src/tree.c
@ -66,9 +66,13 @@ Con *tree_open_con(Con *con) {
|
||||
}
|
||||
|
||||
/* If the currently focused container is a floating container, we
|
||||
* attach the new container to the workspace */
|
||||
if (con->type == CT_FLOATING_CON)
|
||||
con = con->parent;
|
||||
* attach the new container to the currently focused spot in its
|
||||
* workspace. */
|
||||
if (con->type == CT_FLOATING_CON) {
|
||||
con = con_descend_tiling_focused(con->parent);
|
||||
if (con->type != CT_WORKSPACE)
|
||||
con = con->parent;
|
||||
}
|
||||
DLOG("con = %p\n", con);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user