From: Michael Stapelberg Date: Sat, 9 May 2009 17:13:14 +0000 (+0200) Subject: Fix a bug in window placement introduced by the last commit X-Git-Tag: 3.b~113 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b7f94e9b5df4044f78901c5375886c251485bfda;p=i3%2Fi3 Fix a bug in window placement introduced by the last commit --- diff --git a/src/layout.c b/src/layout.c index 83cc9ff3..ea9ff4f2 100644 --- a/src/layout.c +++ b/src/layout.c @@ -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);