diff options
| author | bakkeby <[email protected]> | 2020-09-09 17:24:02 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-09-09 17:24:02 +0200 |
| commit | ff9811f73d1f3d47a6ab7a2a7e44308bf849fb44 (patch) | |
| tree | ded58addbdbcf61bdf8eaa99d9c67f46d1f8921d /patch/bar_awesomebar.c | |
| parent | b3e6e3531b79b4bcd6938f291f9658ca5bbc5dd2 (diff) | |
| download | dwm-flexipatch-ff9811f73d1f3d47a6ab7a2a7e44308bf849fb44.tar.gz dwm-flexipatch-ff9811f73d1f3d47a6ab7a2a7e44308bf849fb44.zip | |
Just some minor changes adding bar border patch ref. #41
Diffstat (limited to 'patch/bar_awesomebar.c')
| -rw-r--r-- | patch/bar_awesomebar.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/patch/bar_awesomebar.c b/patch/bar_awesomebar.c index 4bf537e..47b9eee 100644 --- a/patch/bar_awesomebar.c +++ b/patch/bar_awesomebar.c @@ -1,11 +1,11 @@ int -width_awesomebar(Bar *bar, BarWidthArg *a) +width_awesomebar(Bar *bar, BarArg *a) { - return a->max_width; + return a->w; } int -draw_awesomebar(Bar *bar, BarDrawArg *a) +draw_awesomebar(Bar *bar, BarArg *a) { int n = 0, scm, remainder = 0, tabw, pad; unsigned int i; @@ -44,9 +44,9 @@ draw_awesomebar(Bar *bar, BarDrawArg *a) #endif // BAR_CENTEREDWINDOWNAME_PATCH drw_setscheme(drw, scheme[scm]); - drw_text(drw, x, 0, tabw + (i < remainder ? 1 : 0), bh, pad, c->name, 0, False); + drw_text(drw, x, a->y, tabw + (i < remainder ? 1 : 0), a->h, pad, c->name, 0, False); if (c->isfloating) - drawindicator(c->mon, c, 1, x, w, 0, 0, c->isfixed, floatindicatortype); + drawindicator(c->mon, c, 1, x, a->y, w, a->h, 0, 0, c->isfixed, floatindicatortype); x += tabw + (i < remainder ? 1 : 0); } } @@ -54,7 +54,7 @@ draw_awesomebar(Bar *bar, BarDrawArg *a) } int -click_awesomebar(Bar *bar, Arg *arg, BarClickArg *a) +click_awesomebar(Bar *bar, Arg *arg, BarArg *a) { int x = 0, n = 0; Client *c; @@ -69,8 +69,8 @@ click_awesomebar(Bar *bar, Arg *arg, BarClickArg *a) if (!c || !ISVISIBLE(c)) continue; else - x += (1.0 / (double)n) * a->rel_w; - } while (c && a->rel_x > x && (c = c->next)); + x += (1.0 / (double)n) * a->w; + } while (c && a->x > x && (c = c->next)); if (c) { arg->v = c; |
