fix potential crash in configurex11()

We can't call resize() on unmanaged clients because they don't have borders and
resize() requires them.

Fixes: 94f4ead7da
This commit is contained in:
Leonardo Hernández Hernández 2024-08-10 10:39:25 -06:00
parent 1b805ddd38
commit 334bbe6f0f
No known key found for this signature in database
GPG Key ID: E538897EE11B9624

9
dwl.c
View File

@ -3089,8 +3089,13 @@ configurex11(struct wl_listener *listener, void *data)
event->x, event->y, event->width, event->height); event->x, event->y, event->width, event->height);
return; return;
} }
if ((c->isfloating && c != grabc) if (client_is_unmanaged(c)) {
|| client_is_unmanaged(c) || !c->mon->lt[c->mon->sellt]->arrange) wlr_scene_node_set_position(&c->scene->node, event->x, event->y);
wlr_xwayland_surface_configure(c->surface.xwayland,
event->x, event->y, event->width, event->height);
return;
}
if ((c->isfloating && c != grabc) || !c->mon->lt[c->mon->sellt]->arrange)
resize(c, (struct wlr_box){.x = event->x - c->bw, .y = event->y - c->bw, resize(c, (struct wlr_box){.x = event->x - c->bw, .y = event->y - c->bw,
.width = event->width + c->bw * 2, .height = event->height + c->bw * 2}, 0); .width = event->width + c->bw * 2, .height = event->height + c->bw * 2}, 0);
else else