From 60d9c3b23a85fb8ac57f739265c55ec439f90184 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Tue, 25 Mar 2025 10:47:38 +0800 Subject: [PATCH] fix: error node enable when clip --- maomao.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/maomao.c b/maomao.c index 96198fcb..932579be 100644 --- a/maomao.c +++ b/maomao.c @@ -1046,9 +1046,7 @@ void apply_border(Client *c, struct wlr_box clip_box, int offsetx, wlr_scene_node_set_position(&c->border[3]->node, clip_box.width - c->bw, c->bw); - if ((c->animation.running && c->animation.action != MOVE) || - (c->istiled && strcmp(c->mon->pertag->ltidxs[c->mon->pertag->curtag]->name, - "scroller") == 0)) { + if (c->istiled) { if (c->animation.current.x < c->mon->m.x) { set_rect_size(c->border[2], 0, 0); } else if (c->animation.current.x + c->animation.current.width > @@ -1107,9 +1105,7 @@ void client_apply_clip(Client *c) { } // // make tagout tagin animations not visible in other monitors - if ((c->animation.running && c->animation.action != MOVE) || - (c->istiled && strcmp(c->mon->pertag->ltidxs[c->mon->pertag->curtag]->name, - "scroller") == 0)) { + if (c->istiled) { if (c->animation.current.x <= c->mon->m.x) { offsetx = c->mon->m.x - c->animation.current.x; clip_box.x = clip_box.x + offsetx; @@ -1133,15 +1129,15 @@ void client_apply_clip(Client *c) { } } - animationScale scale_data; - if(clip_box.width <= 0 || clip_box.height <= 0) { + if((clip_box.width <= 0 || clip_box.height <= 0) && (c->istiled)) { c->is_clip_to_hide = true; wlr_scene_node_set_enabled(&c->scene->node, false); return; - } else if(c->is_clip_to_hide) { + } else if(c->is_clip_to_hide && VISIBLEON(c, c->mon)) { c->is_clip_to_hide = false; wlr_scene_node_set_enabled(&c->scene->node, true); } + animationScale scale_data; scale_data.width = clip_box.width - 2 * c->bw; scale_data.height = clip_box.height - 2 * c->bw; wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip_box);