JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Map all top-level-windows in max_stack.
authorReginald Kennedy <rk@rejii.com>
Mon, 29 Oct 2012 15:06:45 +0000 (23:06 +0800)
committerReginald Kennedy <rk@rejii.com>
Mon, 29 Oct 2012 15:34:06 +0000 (23:34 +0800)
Remove unused variable in max_stack.

spectrwm.c

index 4b3eb86..42c8bd2 100644 (file)
@@ -4442,7 +4442,7 @@ max_stack(struct workspace *ws, struct swm_geometry *g)
 {
        struct swm_geometry     gg = *g;
        struct ws_win           *w, *win = NULL, *parent = NULL;
-       int                     winno, num_screens;
+       int                     winno;
 
        DNPRINTF(SWM_D_STACK, "max_stack: workspace: %d\n", ws->idx);
 
@@ -4467,11 +4467,13 @@ max_stack(struct workspace *ws, struct swm_geometry *g)
        DNPRINTF(SWM_D_STACK, "max_stack: win: 0x%x\n", win->id);
 
        /* maximize all top level windows */
-       num_screens = xcb_setup_roots_length(xcb_get_setup(conn));
        TAILQ_FOREACH(w, &ws->winlist, entry) {
                if (w->transient || w->iconic)
                        continue;
 
+               if (!win->mapped && w != win)
+                       map_window(w);
+
                if (w->floating && !w->floatmaxed) {
                        /*
                         * retain geometry for retrieval on exit from