status2d: set the correct scheme before updating colours

This commit is contained in:
bakkeby 2020-07-31 10:24:54 +02:00
parent 55c9570681
commit 68d9a1d7cc

View File

@ -57,7 +57,6 @@ drawstatusbar(int x, char* stext)
short isCode = 0; short isCode = 0;
char *text; char *text;
char *p; char *p;
len = strlen(stext) + 1; len = strlen(stext) + 1;
if (!(text = (char*) malloc(sizeof(char)*len))) if (!(text = (char*) malloc(sizeof(char)*len)))
die("malloc"); die("malloc");
@ -69,6 +68,9 @@ drawstatusbar(int x, char* stext)
#endif // BAR_STATUSCMD_PATCH #endif // BAR_STATUSCMD_PATCH
x += lrpad / 2; x += lrpad / 2;
drw_setscheme(drw, scheme[LENGTH(colors)]);
drw->scheme[ColFg] = scheme[SchemeNorm][ColFg];
drw->scheme[ColBg] = scheme[SchemeNorm][ColBg];
/* process status text */ /* process status text */
i = -1; i = -1;
@ -162,7 +164,6 @@ drawstatusbar(int x, char* stext)
free(p); free(p);
drw_setscheme(drw, scheme[SchemeNorm]); drw_setscheme(drw, scheme[SchemeNorm]);
return x; return x;
} }