From 99770aa89023dffb0ff9bb654859f90e19098220 Mon Sep 17 00:00:00 2001 From: chenyc Date: Tue, 24 Jun 2025 23:20:25 +0800 Subject: [PATCH] update: update offsetx and offsety logic --- src/maomao.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/maomao.c b/src/maomao.c index fdefb07..608628b 100644 --- a/src/maomao.c +++ b/src/maomao.c @@ -1807,7 +1807,7 @@ setclient_coordinate_center(Client *c, struct wlr_box geom, int offsetx, tempbox.height = geom.height; if (offsetx != 0) { - len = m->w.width / 2; + len = (m->w.width - c->geom.width - 2 * m->gappoh) / 2; offset = len * (offsetx / 100.0); tempbox.x += offset; @@ -1820,7 +1820,7 @@ setclient_coordinate_center(Client *c, struct wlr_box geom, int offsetx, } } if (offsety != 0) { - len = m->w.height; + len = (m->w.height - c->geom.height - 2 * m->gappov) / 2; offset = len * (offsety / 100.0); tempbox.y += offset;