re-insert floating cons next to the currently focused con of the appropriate workspace

This commit is contained in:
Michael Stapelberg
2011-01-27 16:04:17 +01:00
parent 2f5d111936
commit f462a9a215
3 changed files with 24 additions and 2 deletions

View File

@ -149,8 +149,10 @@ void floating_disable(Con *con, bool automatic) {
TAILQ_REMOVE(&(con->parent->parent->focus_head), con->parent, focused);
tree_close(con->parent, false, false);
/* 3: re-attach to previous parent */
con->parent = con_get_workspace(con);
/* 3: re-attach to the parent of the currently focused con on the workspace
* this floating con was on */
Con *focused = con_descend_focused(con_get_workspace(con));
con->parent = focused->parent;
/* XXX: We adjust the percentage value to start with a fair value. Floating
* cons always have 1.0 as percent which doesnt work so well when