From 1cedc2f1037f917e263c5b50b175a295d6b70c00 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 28 Sep 2025 14:13:44 +0800 Subject: [PATCH] fix: error offset position for setclient_coordinate_center --- src/fetch/client.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fetch/client.h b/src/fetch/client.h index 5b30d17..edcdb7c 100644 --- a/src/fetch/client.h +++ b/src/fetch/client.h @@ -84,7 +84,7 @@ setclient_coordinate_center(Client *c, struct wlr_box geom, int offsetx, tempbox.height = geom.height; if (offsetx != 0) { - len = (m->w.width - c->geom.width - 2 * m->gappoh) / 2; + len = (m->w.width - tempbox.width - 2 * m->gappoh) / 2; offset = len * (offsetx / 100.0); tempbox.x += offset; @@ -97,7 +97,7 @@ setclient_coordinate_center(Client *c, struct wlr_box geom, int offsetx, } } if (offsety != 0) { - len = (m->w.height - c->geom.height - 2 * m->gappov) / 2; + len = (m->w.height - tempbox.height - 2 * m->gappov) / 2; offset = len * (offsety / 100.0); tempbox.y += offset;