Merge branch 'dwm-pertag-20170513-ceac8c9.diff' into patched
authorDaniel <thefekete@gmail.com>
Sat, 29 Dec 2018 01:10:59 +0000 (02:10 +0100)
committerDaniel <thefekete@gmail.com>
Sat, 29 Dec 2018 01:10:59 +0000 (02:10 +0100)
1  2 
dwm.c

diff --cc dwm.c
--- 1/dwm.c
--- 2/dwm.c
+++ b/dwm.c
@@@ -1887,20 -1725,9 +1913,20 @@@ tile(Monitor *m
  void
  togglebar(const Arg *arg)
  {
-       selmon->showbar = !selmon->showbar;
+       selmon->showbar = selmon->pertag->showbars[selmon->pertag->curtag] = !selmon->showbar;
        updatebarpos(selmon);
 -      XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
 +      resizebarwin(selmon);
 +      if (showsystray) {
 +              XWindowChanges wc;
 +              if (!selmon->showbar)
 +                      wc.y = -bh;
 +              else if (selmon->showbar) {
 +                      wc.y = 0;
 +                      if (!selmon->topbar)
 +                              wc.y = selmon->mh - bh;
 +              }
 +              XConfigureWindow(dpy, systray->win, CWY, &wc);
 +      }
        arrange(selmon);
  }