From 3c6c5dff92a8c6cfba766967aaa8c1bb4c5eaab9 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 9 May 2009 19:13:14 +0200 Subject: [PATCH] Fix a bug in window placement introduced by the last commit --- src/layout.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- 2.39.5