Bugfix: Correctly move to other workspaces when a floating window is focused on the target ws (Thanks mseed)
This commit is contained in:
parent
115462f103
commit
b660769fe0
13
src/con.c
13
src/con.c
|
@ -467,12 +467,21 @@ void con_move_to_workspace(Con *con, Con *workspace) {
|
||||||
if (next->type != CT_WORKSPACE)
|
if (next->type != CT_WORKSPACE)
|
||||||
next = next->parent;
|
next = next->parent;
|
||||||
|
|
||||||
|
/* 4: if the target container is floating, we get the workspace instead.
|
||||||
|
* Only tiling windows need to get inserted next to the current container.
|
||||||
|
* */
|
||||||
|
Con *floatingcon = con_inside_floating(next);
|
||||||
|
if (floatingcon != NULL) {
|
||||||
|
DLOG("floatingcon, going up even further\n");
|
||||||
|
next = floatingcon->parent;
|
||||||
|
}
|
||||||
|
|
||||||
DLOG("Re-attaching container to %p / %s\n", next, next->name);
|
DLOG("Re-attaching container to %p / %s\n", next, next->name);
|
||||||
/* 4: re-attach the con to the parent of this focused container */
|
/* 5: re-attach the con to the parent of this focused container */
|
||||||
con_detach(con);
|
con_detach(con);
|
||||||
con_attach(con, next, false);
|
con_attach(con, next, false);
|
||||||
|
|
||||||
/* 5: keep focus on the current workspace */
|
/* 6: keep focus on the current workspace */
|
||||||
con_focus(focus_next);
|
con_focus(focus_next);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue