idk how this works, but seems to work
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
Nishi 2026-04-20 15:37:50 +09:00
commit ece1527689
2 changed files with 7 additions and 8 deletions

View file

@ -1741,18 +1741,17 @@ static void clip(MwLL handle) {
y = 0;
cx = 0;
cy = 0;
// # ws is traversed result
// # ws[ws.length - 1] is ignored bc it's toplevel
// ws is traversed result
// ws[ws.length - 1] is ignored bc it's toplevel
for(i = arrlen(ws) - 2; i >= 0; i--) {
x += ws[i]->wayland.x;
y += ws[i]->wayland.y;
cx += MAX(-ws[i]->wayland.x, 0);
cy += MAX(-ws[i]->wayland.y, 0);
w = MIN(ws[i]->wayland.ww - MAX(-x, 0), w);
h = MIN(ws[i]->wayland.wh - MAX(-y, 0), h);
}
cx = MAX(-x, 0);
cy = MAX(-y, 0);
arrfree(ws);
handle->wayland.clipping_rect.x = cx;