]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Before rendering, attach the con to its floating_con
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 2 May 2011 09:06:13 +0000 (11:06 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 2 May 2011 09:06:13 +0000 (11:06 +0200)
Otherwise, the rendering will produce negative coordinates.

src/floating.c

index 875407a70ec48d5c5d863925d423bd1ecf339275..85aaa6e7bb4f31edc30040192166dede0e6ac7c6 100644 (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: don’t influence focus handling when Con was not focused before.
     if (set_focus)
         con_focus(con);