From 68d9a1d7cce9329abfc2590aedc4e24bdbf4c606 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Fri, 31 Jul 2020 10:24:54 +0200 Subject: [PATCH] status2d: set the correct scheme before updating colours --- patch/bar_status2d.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/patch/bar_status2d.c b/patch/bar_status2d.c index f98e27a..d4a1e06 100644 --- a/patch/bar_status2d.c +++ b/patch/bar_status2d.c @@ -57,7 +57,6 @@ drawstatusbar(int x, char* stext) short isCode = 0; char *text; char *p; - len = strlen(stext) + 1; if (!(text = (char*) malloc(sizeof(char)*len))) die("malloc"); @@ -69,6 +68,9 @@ drawstatusbar(int x, char* stext) #endif // BAR_STATUSCMD_PATCH x += lrpad / 2; + drw_setscheme(drw, scheme[LENGTH(colors)]); + drw->scheme[ColFg] = scheme[SchemeNorm][ColFg]; + drw->scheme[ColBg] = scheme[SchemeNorm][ColBg]; /* process status text */ i = -1; @@ -162,7 +164,6 @@ drawstatusbar(int x, char* stext) free(p); drw_setscheme(drw, scheme[SchemeNorm]); - return x; }