fix crash when borders align perfectly with screen borders

This commit is contained in:
Tobias Bengfort 2021-09-04 11:55:53 +02:00
parent d4e08c0762
commit 7e6ec58b91

5
dwl.c
View File

@ -1697,8 +1697,9 @@ renderclients(Monitor *m, struct timespec *now)
color = (c == sel) ? focuscolor : bordercolor; color = (c == sel) ? focuscolor : bordercolor;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
scalebox(&borders[i], m->wlr_output->scale); scalebox(&borders[i], m->wlr_output->scale);
wlr_render_rect(drw, &borders[i], color, if (borders[i].width > 0 && borders[i].height > 0)
m->wlr_output->transform_matrix); wlr_render_rect(drw, &borders[i], color,
m->wlr_output->transform_matrix);
} }
} }