Bugfix: Before rendering, attach the con to its floating_con

Otherwise, the rendering will produce negative coordinates.
This commit is contained in:
Michael Stapelberg 2011-05-02 11:06:13 +02:00
parent b2754fd679
commit 7e51f626ef
1 changed files with 3 additions and 2 deletions

View File

@ -147,12 +147,13 @@ void floating_enable(Con *con, bool automatic) {
}
}
TAILQ_INSERT_TAIL(&(nc->nodes_head), con, nodes);
TAILQ_INSERT_TAIL(&(nc->focus_head), con, focused);
/* render the cons to get initial window_rect correct */
render_con(nc, false);
render_con(con, false);
TAILQ_INSERT_TAIL(&(nc->nodes_head), con, nodes);
TAILQ_INSERT_TAIL(&(nc->focus_head), con, focused);
// TODO: dont influence focus handling when Con was not focused before.
if (set_focus)
con_focus(con);