From 587204058b9e2032435e5937ece013277fcab614 Mon Sep 17 00:00:00 2001 From: chenyc Date: Tue, 24 Jun 2025 23:32:30 +0800 Subject: [PATCH] fix: fix the border calculation issue in smartmovewin --- src/maomao.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/maomao.c b/src/maomao.c index 608628b..9ed0367 100644 --- a/src/maomao.c +++ b/src/maomao.c @@ -7784,7 +7784,7 @@ void smartmovewin(const Arg *arg) { } ny = tar == -99999 ? ny : tar; - ny = MAX(ny, c->mon->w.y); + ny = MAX(ny, c->mon->w.y + c->mon->gappov); break; case DOWN: tar = 99999; @@ -7803,7 +7803,7 @@ void smartmovewin(const Arg *arg) { }; } ny = tar == 99999 ? ny : tar; - ny = MIN(ny, c->mon->w.y + c->mon->w.height - c->geom.height); + ny = MIN(ny, c->mon->w.y + c->mon->w.height - c->geom.height - c->mon->gappov); break; case LEFT: tar = -99999; @@ -7823,7 +7823,7 @@ void smartmovewin(const Arg *arg) { } nx = tar == -99999 ? nx : tar; - nx = MAX(nx, c->mon->w.x); + nx = MAX(nx, c->mon->w.x + c->mon->gappoh); break; case RIGHT: tar = 99999; @@ -7841,7 +7841,7 @@ void smartmovewin(const Arg *arg) { }; } nx = tar == 99999 ? nx : tar; - nx = MIN(nx, c->mon->w.x + c->mon->w.width - c->geom.width); + nx = MIN(nx, c->mon->w.x + c->mon->w.width - c->geom.width - c->mon->gappoh); break; }