Bugfix: Correctly free containers, the bug was not freeing when not moving

This commit is contained in:
Michael Stapelberg
2009-03-09 08:14:00 +01:00
parent 71993c9b48
commit 00f08cba75
2 changed files with 41 additions and 27 deletions

View File

@ -144,7 +144,6 @@ static bool move_current_window_in_container(xcb_connection_t *conn, Client *cli
LOG("i can do that\n");
/* We can move the client inside its current container */
/* TODO: needs wrapping */
CIRCLEQ_REMOVE(&(client->container->clients), client, clients);
if (direction == D_UP)
CIRCLEQ_INSERT_BEFORE(&(client->container->clients), other, client, clients);
@ -222,11 +221,13 @@ static void move_current_window(xcb_connection_t *conn, direction_t direction) {
container->currently_focused = to_focus;
new->currently_focused = current_client;
Workspace *workspace = container->workspace;
/* delete all empty columns/rows */
cleanup_table(conn, container->workspace);
cleanup_table(conn, workspace);
/* Fix colspan/rowspan if itd overlap */
fix_colrowspan(conn, container->workspace);
fix_colrowspan(conn, workspace);
render_layout(conn);