opt: opt offset caculate for border clip

sdf
This commit is contained in:
DreamMaoMao 2025-05-10 16:02:24 +08:00
parent 9fe1baeda7
commit f0a9ff2e97

View file

@ -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) {