diff options
author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-08-10 10:39:25 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-08-10 10:47:48 -0600 |
commit | 334bbe6f0f5e4f77789b42ac9e5607d5076aef1b (patch) | |
tree | a8e943856ab32d3bbaaf773ca26c7ad52bc03e81 /dwl.c | |
parent | 1b805ddd38aeb03dbf64886fb9a153f76f4eb8e0 (diff) | |
download | dwl-334bbe6f0f5e4f77789b42ac9e5607d5076aef1b.tar.gz |
fix potential crash in configurex11()
We can't call resize() on unmanaged clients because they don't have borders and
resize() requires them.
Fixes: 94f4ead7dad89433e6087dc19950738c64bbed05
Diffstat (limited to 'dwl.c')
-rw-r--r-- | dwl.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -3089,8 +3089,13 @@ configurex11(struct wl_listener *listener, void *data) event->x, event->y, event->width, event->height); return; } - if ((c->isfloating && c != grabc) - || client_is_unmanaged(c) || !c->mon->lt[c->mon->sellt]->arrange) + if (client_is_unmanaged(c)) { + 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, .width = event->width + c->bw * 2, .height = event->height + c->bw * 2}, 0); else |