From 3543a15189b01981db4666dfe2b7b8f9924a4f1b Mon Sep 17 00:00:00 2001 From: Reginald Kennedy Date: Mon, 29 Oct 2012 23:06:45 +0800 Subject: [PATCH] Map all top-level-windows in max_stack. Remove unused variable in max_stack. --- spectrwm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spectrwm.c b/spectrwm.c index 4b3eb86..42c8bd2 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -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 -- 2.39.2