Don’t assign ->container for dock-windows

This commit is contained in:
Michael Stapelberg
2009-02-23 03:44:10 +01:00
parent 8b0bc8c3ff
commit 07b92c2792
5 changed files with 33 additions and 16 deletions

View File

@ -141,9 +141,6 @@ void reparent_window(xcb_connection_t *conn, xcb_window_t child,
uint32_t mask = 0;
uint32_t values[3];
/* Insert into the currently active container */
CIRCLEQ_INSERT_TAIL(&(CUR_CELL->clients), new, clients);
/* Update the data structures */
CUR_CELL->currently_focused = new;
new->container = CUR_CELL;
@ -222,7 +219,8 @@ void reparent_window(xcb_connection_t *conn, xcb_window_t child,
new->dock = true;
new->titlebar_position = TITLEBAR_OFF;
new->force_reconfigure = true;
SLIST_INSERT_HEAD(&(new->container->workspace->dock_clients), new, dock_clients);
new->container = NULL;
SLIST_INSERT_HEAD(&(c_ws->dock_clients), new, dock_clients);
}
}
@ -238,6 +236,10 @@ void reparent_window(xcb_connection_t *conn, xcb_window_t child,
printf("the client wants to be %d pixels height\n", new->desired_height);
}
/* Insert into the currently active container, if its not a dock window */
if (!new->dock)
CIRCLEQ_INSERT_TAIL(&(CUR_CELL->clients), new, clients);
render_layout(conn);
}