mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-04-08 08:21:00 -04: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
1 changed files with 14 additions and 12 deletions
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…
Add table
Add a link
Reference in a new issue