diff options
| author | bakkeby <[email protected]> | 2020-08-22 08:43:07 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-08-22 08:43:07 +0200 |
| commit | 110cc7d24042d88521a5edd67adf35eb5d949776 (patch) | |
| tree | 9752df419472892b495ff7759fd4e786bbebb109 /patch/bar_tabgroups.c | |
| parent | 81488b4862487c6debed8f447db217d2d2c78ecb (diff) | |
| download | dwm-flexipatch-110cc7d24042d88521a5edd67adf35eb5d949776.tar.gz dwm-flexipatch-110cc7d24042d88521a5edd67adf35eb5d949776.zip | |
Added logic to auto-hide bars if nothing is drawn on them (e.g. for standalone bars that only show certain clients)
Diffstat (limited to 'patch/bar_tabgroups.c')
| -rw-r--r-- | patch/bar_tabgroups.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/patch/bar_tabgroups.c b/patch/bar_tabgroups.c index 7036882..b4b2b0a 100644 --- a/patch/bar_tabgroups.c +++ b/patch/bar_tabgroups.c @@ -34,8 +34,7 @@ int draw_bartabgroups(Bar *bar, BarDrawArg *a) { drw_rect(drw, a->x, 0, a->w, bh, 1, 1); - bartabcalculate(bar->mon, a->x, a->w, -1, bartabdraw, NULL); - return a->x + a->w; + return bartabcalculate(bar->mon, a->x, a->w, -1, bartabdraw, NULL); } int @@ -105,7 +104,7 @@ bartabclick(Monitor *m, Client *c, int passx, int x, int w, int unused, Arg *arg arg->v = c; } -void +int bartabcalculate( Monitor *m, int offx, int tabw, int passx, void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg), Arg *arg @@ -143,7 +142,7 @@ bartabcalculate( } if (clientsnmaster + clientsnstack + clientsnfloating + clientsnhidden == 0) - return; + return 0; tgactive = 1; num = tabw; @@ -230,4 +229,5 @@ bartabcalculate( } #endif // BARTAB_FLOATWEIGHT } + return 1; }
\ No newline at end of file |
