]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Correctly map/unmap stack windows
authorMichael Stapelberg <michael+git@stapelberg.de>
Wed, 25 Feb 2009 01:05:08 +0000 (02:05 +0100)
committerMichael Stapelberg <michael+git@stapelberg.de>
Wed, 25 Feb 2009 01:05:08 +0000 (02:05 +0100)
src/commands.c

index e05c0af506fe43bed3192c513eea4d9b79f90156..38ce6ef14de58a52e2ee8363e82c6af01fc0756c 100644 (file)
@@ -298,6 +298,12 @@ static void show_workspace(xcb_connection_t *conn, int workspace) {
                         CIRCLEQ_FOREACH(client, &(c_ws->table[cols][rows]->clients), clients)
                                 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];
         current_row = c_ws->current_row;
         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)
                                 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 */
         if (CUR_CELL->currently_focused != NULL)
                 xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, CUR_CELL->currently_focused->child, XCB_CURRENT_TIME);