]> git.sur5r.net Git - i3/i3/commitdiff
Fix a bug in window placement introduced by the last commit
authorMichael Stapelberg <michael+x200@stapelberg.de>
Sat, 9 May 2009 17:13:14 +0000 (19:13 +0200)
committerMichael Stapelberg <michael+x200@stapelberg.de>
Sat, 9 May 2009 17:13:14 +0000 (19:13 +0200)
src/layout.c

index 83cc9ff3a0726e99c1454e6402baa9a0ff859c5d..ea9ff4f260a8e097b998d8f20c0b4261233c633c 100644 (file)
@@ -509,7 +509,7 @@ void render_workspace(xcb_connection_t *conn, i3Screen *screen, Workspace *r_ws)
         /* Go through the whole table and render what’s necessary */
         FOR_TABLE(r_ws) {
                 Container *container = r_ws->table[cols][rows];
-                int single_width, single_height;
+                int single_width = -1, single_height;
                 LOG("\n");
                 LOG("========\n");
                 LOG("container has %d colspan, %d rowspan\n",
@@ -526,8 +526,10 @@ void render_workspace(xcb_connection_t *conn, i3Screen *screen, Workspace *r_ws)
                         if (r_ws->width_factor[cols+c] == 0)
                                 container->width += (width / r_ws->cols);
                         else container->width += get_unoccupied_x(r_ws) * r_ws->width_factor[cols+c];
+
+                        if (single_width == -1)
+                                single_width = container->width;
                 }
-                single_width = container->width;
 
                 //if (container->height_factor == 0)
                         container->height = (height / r_ws->rows);