From 45054a34a4f4817c7a87576147fdbbc8272af0a0 Mon Sep 17 00:00:00 2001 From: save196 Date: Thu, 17 Sep 2026 14:59:35 +0000 Subject: [PATCH] always apply a minimum size of 1x1 Resizing with the mouse can make the size negative, which makes dwl crash, and the minimum is 1 because 0 makes some X11 clients crash. --- dwl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dwl.c b/dwl.c index 0e90c8f..dada453 100644 --- a/dwl.c +++ b/dwl.c @@ -488,6 +488,10 @@ static struct wlr_xwayland *xwayland; void applybounds(Client *c, struct wlr_box *bbox) { + /* set minimum client size to 1 */ + c->geom.width = MAX(1 + 2 * (int)c->bw, c->geom.width); + c->geom.height = MAX(1 + 2 * (int)c->bw, c->geom.height); + if (!c->isfullscreen) { struct wlr_box min = {0}, max = {0}; client_get_size_hints(c, &max, &min);