Add and use DWM function "updatebars"

This commit is contained in:
Alex Kotov 2021-11-17 09:54:57 +05:00
parent 6cb0b036d0
commit 631fdd6bcf
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -265,6 +265,7 @@ static void unfocus(Client *c, int setfocus);
static void unmanage(Client *c, int destroyed); static void unmanage(Client *c, int destroyed);
static void updatebarpos(Monitor *m); static void updatebarpos(Monitor *m);
static void updatebar(Monitor *m); static void updatebar(Monitor *m);
static void updatebars();
static void updateclientlist(void); static void updateclientlist(void);
static int updategeom(void); static int updategeom(void);
static void updatenumlockmask(void); static void updatenumlockmask(void);
@ -1914,7 +1915,7 @@ togglebar(const Arg *arg)
{ {
unit_toggle_show_bar(selmon->pertag->units[selmon->pertag->curtag]); unit_toggle_show_bar(selmon->pertag->units[selmon->pertag->curtag]);
updatebar(selmon); updatebars();
} }
void void
@ -2072,6 +2073,14 @@ updatebar(Monitor *m)
arrange(m); arrange(m);
} }
void
updatebars()
{
for (Monitor *m = mons; m; m = m->next) {
updatebar(m);
}
}
void void
updatebarpos(Monitor *m) updatebarpos(Monitor *m)
{ {