From f0a9ff2e97821d6f4282ce95804f3b62e9a9d607 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 10 May 2025 16:02:24 +0800 Subject: [PATCH] opt: opt offset caculate for border clip sdf --- src/maomao.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/maomao.c b/src/maomao.c index 3eeb893..9d088c0 100644 --- a/src/maomao.c +++ b/src/maomao.c @@ -1094,7 +1094,7 @@ void apply_border(Client *c, struct wlr_box clip_box, int offsetx, set_rect_size( c->border[3], GEZERO(c->bw - (c->animation.current.x + c->animation.current.width - - c->mon->m.x + c->mon->m.width)), + c->mon->m.x - c->mon->m.width)), clip_box.height - 2 * c->bw); } else if (c->animation.current.y < c->mon->m.y) { set_rect_size(c->border[0], clip_box.width, GEZERO(c->bw - offsety)); @@ -1103,7 +1103,7 @@ void apply_border(Client *c, struct wlr_box clip_box, int offsetx, set_rect_size( c->border[1], clip_box.width, GEZERO(c->bw - (c->animation.current.y + c->animation.current.height - - c->mon->m.y + c->mon->m.height))); + c->mon->m.y - c->mon->m.height))); } } @@ -1137,8 +1137,7 @@ struct uvec2 clip_to_hide(Client *c, struct wlr_box *clip_box) { c->mon->m.x + c->mon->m.width) { clip_box->width = clip_box->width - (c->animation.current.x + c->animation.current.width - - c->mon->m.x - c->mon->m.width) + - c->bw; + c->mon->m.x - c->mon->m.width); } if (c->animation.current.y <= c->mon->m.y) {