fix integer underflow in tile()

When clients don't fit, my or ty can exceed m->w.height, and since they
were unsigned, m->w.height - my wrapped around to huge heights, hanging
dwl. With signed ints the height can become negative instead, which
applybounds() raises to the minimum size.

Fixes: https://codeberg.org/dwl/dwl/issues/1254
This commit is contained in:
Guido Cella
2026-11-06 08:11:52 +01:00
parent 15bff401c4
commit 0996407e3d
+1 -2
View File
@@ -3054,8 +3054,7 @@ tagmon(const Arg *arg)
void
tile(Monitor *m)
{
unsigned int mw, my, ty;
int i, n = 0;
int i, n = 0, mw, my, ty;
Client *c;
wl_list_for_each(c, &clients, link)