barmodules: skip if widthfunc is NULL

This commit is contained in:
bakkeby 2020-09-10 09:52:46 +02:00
parent c257e2e390
commit ed0e503a6b

2
dwm.c
View File

@ -1587,7 +1587,7 @@ drawbarwin(Bar *bar)
drw_rect(drw, lx, bar->borderpx, lw, bar->bh - 2 * bar->borderpx, 1, 1);
for (r = 0; r < LENGTH(barrules); r++) {
br = &barrules[r];
if (br->bar != bar->idx || (br->monitor == 'A' && bar->mon != selmon))
if (br->bar != bar->idx || !bar->widthfunc || (br->monitor == 'A' && bar->mon != selmon))
continue;
if (br->monitor != 'A' && br->monitor != -1 && br->monitor != bar->mon->index)
continue;