From 7acc4b5d85586fa69a3f0b5f78c0d2ac70f6d5c8 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Fri, 21 Mar 2025 10:41:25 +0800 Subject: [PATCH] opt: avoid apply border to zero clipbox --- maomao.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maomao.c b/maomao.c index d73e2fc..b9aa2c6 100644 --- a/maomao.c +++ b/maomao.c @@ -966,6 +966,9 @@ void apply_border(Client *c, struct wlr_box clip_box, int offsetx, if (c->iskilling || !client_surface(c)->mapped) return; + if(clip_box.width <= 0 || clip_box.height <= 0) + return; + wlr_scene_node_set_position(&c->scene_surface->node, c->bw, c->bw); wlr_scene_rect_set_size(c->border[0], clip_box.width, c->bw); wlr_scene_rect_set_size(c->border[1], clip_box.width, c->bw);