From 942f05838c4a4b1f522b58d9b6913dbf17b257ca Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Mon, 22 Jun 2026 16:50:22 +0800 Subject: [PATCH] fix: clip error when cross monitor --- src/animation/client.h | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/animation/client.h b/src/animation/client.h index eb0eb328..cb392328 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -13,8 +13,8 @@ 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)) { + if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining && + !c->animation.tagouting)) { return current_corner_location; } @@ -376,8 +376,8 @@ void client_draw_shadow(Client *c) { int32_t right_offset, bottom_offset, left_offset, top_offset; - if (c == grabc || - (!ISTILED(c) && !c->animation.tagining && !c->animation.tagouting)) { + if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining && + !c->animation.tagouting)) { right_offset = 0; bottom_offset = 0; left_offset = 0; @@ -448,8 +448,8 @@ void client_draw_title(Client *c) { int32_t bottom_over = tab_y + config.group_bar_height - c->mon->m.y - c->mon->m.height; - if (c != grabc && - (ISSCROLLTILED(c) || c->animation.tagining || c->animation.tagouting)) { + if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining && + !c->animation.tagouting)) { if (top_over > 0) { tab_y = c->mon->m.y; th = config.group_bar_height - top_over; @@ -498,6 +498,14 @@ void apply_shield(Client *c, struct wlr_box clip_box) { return; } + if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining && + !c->animation.tagouting)) { + clip_box.x = 0; + clip_box.y = 0; + clip_box.width = c->animation.current.width - 2 * (int32_t)c->bw; + clip_box.height = c->animation.current.height - 2 * (int32_t)c->bw; + } + if (active_capture_count > 0 && c->shield_when_capture) { wlr_scene_node_raise_to_top(&c->shield->node); wlr_scene_node_set_position(&c->shield->node, clip_box.x, clip_box.y); @@ -681,8 +689,8 @@ void apply_border(Client *c) { int32_t right_offset, bottom_offset, left_offset, top_offset; - if (c == grabc || - (!ISTILED(c) && !c->animation.tagining && !c->animation.tagouting)) { + if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining && + !c->animation.tagouting)) { right_offset = 0; bottom_offset = 0; left_offset = 0;