Bugfix: Obey workspace_layout when re-inserting floating containers (+test) (Thanks aksr)

The code wasn’t using con_attach and therefore didn’t obey workspace_layout.

Fixes: #631
This commit is contained in:
Michael Stapelberg
2012-01-30 16:03:51 +00:00
parent 714c8fcbe7
commit 4f98bbf5ff
2 changed files with 20 additions and 3 deletions

View File

@ -238,11 +238,10 @@ void floating_disable(Con *con, bool automatic) {
/* con_fix_percent will adjust the percent value */
con->percent = 0.0;
TAILQ_INSERT_TAIL(&(con->parent->nodes_head), con, nodes);
TAILQ_INSERT_TAIL(&(con->parent->focus_head), con, focused);
con->floating = FLOATING_USER_OFF;
con_attach(con, con->parent, false);
con_fix_percent(con->parent);
// TODO: dont influence focus handling when Con was not focused before.
con_focus(con);