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_systray.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_systray.c')
| -rw-r--r-- | patch/bar_systray.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/patch/bar_systray.c b/patch/bar_systray.c index 0ff730d..dc267fb 100644 --- a/patch/bar_systray.c +++ b/patch/bar_systray.c @@ -17,7 +17,7 @@ int draw_systray(Bar *bar, BarDrawArg *a) { if (!showsystray) - return a->x; + return 0; XSetWindowAttributes wa; Client *i; @@ -61,7 +61,7 @@ draw_systray(Bar *bar, BarDrawArg *a) fprintf(stderr, "dwm: unable to obtain system tray.\n"); free(systray); systray = NULL; - return a->x; + return 0; } } @@ -86,7 +86,7 @@ draw_systray(Bar *bar, BarDrawArg *a) } XMoveResizeWindow(dpy, systray->win, bar->bx + a->x + lrpad / 2, (w ? bar->by : -bar->by), MAX(w, 1), bar->bh); - return a->x + a->w; + return w; } int |
