Bugfix: Correctly unmap stack windows and don’t re-map them too early
This commit is contained in:
parent
35d811db82
commit
20875494ee
|
@ -39,9 +39,11 @@ void client_remove_from_container(xcb_connection_t *conn, Client *client, Contai
|
|||
/* If the container will be empty now and is in stacking mode, we need to
|
||||
unmap the stack_win */
|
||||
if (CIRCLEQ_EMPTY(&(container->clients)) && container->mode == MODE_STACK) {
|
||||
LOG("Unmapping stack window\n");
|
||||
struct Stack_Window *stack_win = &(container->stack_win);
|
||||
stack_win->rect.height = 0;
|
||||
xcb_unmap_window(conn, stack_win->window);
|
||||
xcb_flush(conn);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -334,7 +334,7 @@ void render_container(xcb_connection_t *conn, Container *container) {
|
|||
|
||||
/* Check if we need to remap our stack title window, it gets unmapped when the container
|
||||
is empty in src/handlers.c:unmap_notify() */
|
||||
if (stack_win->rect.height == 0)
|
||||
if (stack_win->rect.height == 0 && num_clients > 0)
|
||||
xcb_map_window(conn, stack_win->window);
|
||||
|
||||
/* Check if we need to reconfigure our stack title window */
|
||||
|
|
|
@ -424,7 +424,9 @@ void switch_layout_mode(xcb_connection_t *conn, Container *container, int mode)
|
|||
XCB_EVENT_MASK_EXPOSURE; /* …our window needs to be redrawn */
|
||||
|
||||
struct Stack_Window *stack_win = &(container->stack_win);
|
||||
stack_win->window = create_window(conn, rect, XCB_WINDOW_CLASS_INPUT_OUTPUT, XCB_CURSOR_LEFT_PTR, true, mask, values);
|
||||
stack_win->window = create_window(conn, rect, XCB_WINDOW_CLASS_INPUT_OUTPUT, XCB_CURSOR_LEFT_PTR, false, mask, values);
|
||||
|
||||
stack_win->rect.height = 0;
|
||||
|
||||
/* Initialize the entry for our cached pixmap. It will be
|
||||
* created as soon as it’s needed (see cached_pixmap_prepare). */
|
||||
|
|
Loading…
Reference in New Issue