X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/37e062b0ed475fb6d9030f05b353c4fb79b7c6e5..598e22907e6a3bcfbc35f913dae24d031d6f9170:/layout.c diff --git a/layout.c b/layout.c index 26e9de6..0f17b69 100644 --- a/layout.c +++ b/layout.c @@ -189,6 +189,7 @@ restack(void) { XLowerWindow(dpy, c->win); } } + XRaiseWindow(dpy, barwin); XSync(dpy, False); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } @@ -218,7 +219,10 @@ setlayout(const char *arg) { void togglebar(const char *arg) { - bpos = (bpos == BarOff) ? BARPOS : BarOff; + if(bpos == BarOff) + bpos = (BARPOS == BarOff) ? BarTop : BARPOS; + else + bpos = BarOff; updatebarpos(); lt->arrange(); }