Bugfix: Correctly cleanup stack_windows when setting clients to floating

This fixes ticket #44
This commit is contained in:
Michael Stapelberg
2009-05-30 11:35:32 +02:00
parent ac6561019b
commit b1eb93326f
5 changed files with 9 additions and 7 deletions

View File

@ -29,10 +29,11 @@
* one or because it was unmapped
*
*/
void client_remove_from_container(xcb_connection_t *conn, Client *client, Container *container) {
void client_remove_from_container(xcb_connection_t *conn, Client *client, Container *container, bool remove_from_focusstack) {
CIRCLEQ_REMOVE(&(container->clients), client, clients);
SLIST_REMOVE(&(container->workspace->focus_stack), client, Client, focus_clients);
if (remove_from_focusstack)
SLIST_REMOVE(&(container->workspace->focus_stack), client, Client, focus_clients);
/* If the container will be empty now and is in stacking mode, we need to
unmap the stack_win */