X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=scrotwm.c;h=45e0787a6940fed9060ba050c2cac5befbd10702;hb=08c761d14b4c40dcf0be20dc5fc1ae71f81eff12;hp=0d4fc1ea2bc8aaa3094d3e935e29e8f4c77d1f26;hpb=433cf0a7cbd857524a086aa2d2e5b9553e86298e;p=spectrwm.git diff --git a/scrotwm.c b/scrotwm.c index 0d4fc1e..45e0787 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -185,6 +185,8 @@ bar_signal(int sig) void bar_toggle(union arg *args) { + int i; + DNPRINTF(SWM_D_MISC, "bar_toggle\n"); if (bar_enabled) { @@ -197,6 +199,8 @@ bar_toggle(union arg *args) XMapWindow(display, bar_window); } XSync(display, False); + for (i = 0; i < SWM_WS_MAX; i++) + ws[i].restack = 1; stack(); bar_print(); /* must be after stack */ @@ -274,6 +278,7 @@ switchws(union arg *args) ignore_enter = 1; if (ws[wsid].restack) { stack(); + bar_print(); } else { if (ws[wsid].focus != NULL) focus_win(ws[wsid].focus); @@ -334,6 +339,8 @@ stack(void) winfocus->id = root; + ws[current_ws].restack = 0; + if (ws[current_ws].winno == 0) return;