From a2f7c4b23574dedf436c4eb6c766973a28b749eb Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Mon, 22 Jun 2026 09:54:08 +0800 Subject: [PATCH] opt: optimize shadow and border drap when floating cross monitor --- src/animation/client.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/animation/client.h b/src/animation/client.h index 5e300547..10c3d836 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -12,6 +12,12 @@ void set_rect_size(struct wlr_scene_rect *rect, int32_t width, int32_t height) { struct fx_corner_radii set_client_corner_location(Client *c) { struct fx_corner_radii current_corner_location = corner_radii_all(config.border_radius); + + if (c == grabc || + (!ISTILED(c) && !c->animation.tagining && !c->animation.tagouting)) { + return current_corner_location; + } + struct wlr_box target_geom = config.animations ? c->animation.current : c->geom; if (target_geom.x + config.border_radius <= c->mon->m.x) { @@ -370,7 +376,8 @@ void client_draw_shadow(Client *c) { int32_t right_offset, bottom_offset, left_offset, top_offset; - if (c == grabc) { + if (c == grabc || + (!ISTILED(c) && !c->animation.tagining && !c->animation.tagouting)) { right_offset = 0; bottom_offset = 0; left_offset = 0; @@ -674,7 +681,8 @@ void apply_border(Client *c) { int32_t right_offset, bottom_offset, left_offset, top_offset; - if (c == grabc) { + if (c == grabc || + (!ISTILED(c) && !c->animation.tagining && !c->animation.tagouting)) { right_offset = 0; bottom_offset = 0; left_offset = 0;