]> git.sur5r.net Git - i3/i3/blobdiff - src/handlers.c
Bugfix: Correctly check for empty containers and unmap the stack_win
[i3/i3] / src / handlers.c
index 939fe63659188ddc3c46db140a83defd79676cbc..88b09b6bc2b338c0b3bcd25f1f31032db6f82f78 100644 (file)
@@ -433,16 +433,8 @@ int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_noti
                 if (client->fullscreen)
                         con->workspace->fullscreen_client = NULL;
 
-                /* If the container will be empty now and is in stacking mode, we need to
-                   correctly resize the stack_win */
-                if (CIRCLEQ_EMPTY(&(con->clients)) && con->mode == MODE_STACK) {
-                        struct Stack_Window *stack_win = &(con->stack_win);
-                        stack_win->rect.height = 0;
-                        xcb_unmap_window(conn, stack_win->window);
-                }
-
                 /* Remove the client from the list of clients */
-                CIRCLEQ_REMOVE(&(con->clients), client, clients);
+                remove_client_from_container(conn, client, con);
 
                 /* Remove from the focus stack */
                 LOG("Removing from focus stack\n");