mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-29 11:04:14 +00:00
Allow borderpx=0
Avoids crashing with the error dwl: render/wlr_renderer.c:102: wlr_render_rect: Assertion `box->width > 0 && box->height > 0' failed.
This commit is contained in:
parent
44ef698d6e
commit
57e3ce37f3
2
dwl.c
2
dwl.c
@ -1184,6 +1184,7 @@ renderclients(Monitor *m, struct timespec *now)
|
|||||||
&ox, &oy);
|
&ox, &oy);
|
||||||
w = surface->current.width;
|
w = surface->current.width;
|
||||||
h = surface->current.height;
|
h = surface->current.height;
|
||||||
|
if (c->bw) {
|
||||||
borders = (struct wlr_box[4]) {
|
borders = (struct wlr_box[4]) {
|
||||||
{ox, oy, w + 2 * c->bw, c->bw}, /* top */
|
{ox, oy, w + 2 * c->bw, c->bw}, /* top */
|
||||||
{ox, oy + c->bw, c->bw, h}, /* left */
|
{ox, oy + c->bw, c->bw, h}, /* left */
|
||||||
@ -1198,6 +1199,7 @@ renderclients(Monitor *m, struct timespec *now)
|
|||||||
wlr_render_rect(drw, &borders[i], color,
|
wlr_render_rect(drw, &borders[i], color,
|
||||||
m->wlr_output->transform_matrix);
|
m->wlr_output->transform_matrix);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* This calls our render function for each surface among the
|
/* This calls our render function for each surface among the
|
||||||
* xdg_surface's toplevel and popups. */
|
* xdg_surface's toplevel and popups. */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user