Bugfix: Correctly map/unmap stack windows
This commit is contained in:
parent
7333f16aca
commit
0edc523885
|
@ -298,6 +298,12 @@ static void show_workspace(xcb_connection_t *conn, int workspace) {
|
||||||
CIRCLEQ_FOREACH(client, &(c_ws->table[cols][rows]->clients), clients)
|
CIRCLEQ_FOREACH(client, &(c_ws->table[cols][rows]->clients), clients)
|
||||||
xcb_unmap_window(conn, client->frame);
|
xcb_unmap_window(conn, client->frame);
|
||||||
|
|
||||||
|
/* Unmap the stack windows on the current workspace, if any */
|
||||||
|
struct Stack_Window *stack_win;
|
||||||
|
SLIST_FOREACH(stack_win, &stack_wins, stack_windows)
|
||||||
|
if (stack_win->container->workspace == c_ws)
|
||||||
|
xcb_unmap_window(conn, stack_win->window);
|
||||||
|
|
||||||
c_ws = &workspaces[workspace-1];
|
c_ws = &workspaces[workspace-1];
|
||||||
current_row = c_ws->current_row;
|
current_row = c_ws->current_row;
|
||||||
current_col = c_ws->current_col;
|
current_col = c_ws->current_col;
|
||||||
|
@ -309,6 +315,11 @@ static void show_workspace(xcb_connection_t *conn, int workspace) {
|
||||||
CIRCLEQ_FOREACH(client, &(c_ws->table[cols][rows]->clients), clients)
|
CIRCLEQ_FOREACH(client, &(c_ws->table[cols][rows]->clients), clients)
|
||||||
xcb_map_window(conn, client->frame);
|
xcb_map_window(conn, client->frame);
|
||||||
|
|
||||||
|
/* Map all stack windows, if any */
|
||||||
|
SLIST_FOREACH(stack_win, &stack_wins, stack_windows)
|
||||||
|
if (stack_win->container->workspace == c_ws)
|
||||||
|
xcb_map_window(conn, stack_win->window);
|
||||||
|
|
||||||
/* Restore focus on the new workspace */
|
/* Restore focus on the new workspace */
|
||||||
if (CUR_CELL->currently_focused != NULL)
|
if (CUR_CELL->currently_focused != NULL)
|
||||||
xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, CUR_CELL->currently_focused->child, XCB_CURRENT_TIME);
|
xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, CUR_CELL->currently_focused->child, XCB_CURRENT_TIME);
|
||||||
|
|
Loading…
Reference in New Issue