From 7ce66bf122fd8b7288a5e0ddf0d0e312a0f08456 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Mon, 24 Aug 2020 00:26:26 +0200 Subject: [PATCH] Identified and fixed a few more cross-compilation issues related to prior refactoring / simplification --- drw.c | 4 ++-- patch/bar_powerline_status.c | 2 +- patch/bar_powerline_tags.c | 4 ++-- patch/bar_statuscolors.c | 6 +----- patch/bar_tabgroups.c | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/drw.c b/drw.c index 7ee8b99..08808b6 100644 --- a/drw.c +++ b/drw.c @@ -618,11 +618,11 @@ drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h) } unsigned int -drw_fontset_getwidth(Drw *drw, const char *text, Bool ignored) +drw_fontset_getwidth(Drw *drw, const char *text, Bool markup) { if (!drw || !drw->fonts || !text) return 0; - return drw_text(drw, 0, 0, 0, 0, 0, text, 0, ignored); + return drw_text(drw, 0, 0, 0, 0, 0, text, 0, markup); } #if BAR_PANGO_PATCH diff --git a/patch/bar_powerline_status.c b/patch/bar_powerline_status.c index 3e2ee6a..03847d6 100644 --- a/patch/bar_powerline_status.c +++ b/patch/bar_powerline_status.c @@ -102,7 +102,7 @@ drawpowerlinestatus(int xpos, char *stext) drw_setscheme(drw, nxtscheme); w = TEXTW(bs+2); - drw_text(drw, x - w, 0, w, bh, lrpad / 2, bs+2, 0); + drw_text(drw, x - w, 0, w, bh, lrpad / 2, bs+2, 0, False); x -= w; bp = *bs; diff --git a/patch/bar_powerline_tags.c b/patch/bar_powerline_tags.c index 38035ff..b627c8f 100644 --- a/patch/bar_powerline_tags.c +++ b/patch/bar_powerline_tags.c @@ -61,8 +61,8 @@ draw_pwrl_tags(Bar *bar, BarDrawArg *a) #endif // BAR_POWERLINE_TAGS_SLASH_PATCH x += plw; drw_setscheme(drw, nxtscheme); - drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], invert); - drawindicator(m, NULL, occ, x, w, i, -1, invert, tagindicatortype); + drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], invert, False); + drawindicator(bar->mon, NULL, occ, x, w, i, -1, invert, tagindicatortype); x += w; prevscheme = nxtscheme; } diff --git a/patch/bar_statuscolors.c b/patch/bar_statuscolors.c index cc24ad4..a443056 100644 --- a/patch/bar_statuscolors.c +++ b/patch/bar_statuscolors.c @@ -12,11 +12,7 @@ textw_wosc(char *s) } ctmp = *ts; *ts = '\0'; - #if BAR_PANGO_PATCH - sw += drw_font_getwidth(drw, tp, True); - #else - sw += drw_fontset_getwidth(drw, tp); - #endif // BAR_PANGO_PATCH + sw += drw_fontset_getwidth(drw, tp, True); *ts = ctmp; if (ctmp == '\0') break; diff --git a/patch/bar_tabgroups.c b/patch/bar_tabgroups.c index 055094d..798f67b 100644 --- a/patch/bar_tabgroups.c +++ b/patch/bar_tabgroups.c @@ -59,7 +59,7 @@ bartabdraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg pad = (w - TEXTW(c->name) + lrpad) / 2; #endif // BAR_CENTEREDWINDOWNAME_PATCH - drw_text(drw, x, 0, w, bh, pad, c->name, 0); + drw_text(drw, x, 0, w, bh, pad, c->name, 0, False); if (c->isfloating) drawindicator(m, c, 1, x, w, 0, 0, c->isfixed, floatindicatortype);