From 6010cea8051b82004392b092958b960d280271ce Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 8 Nov 2025 20:10:11 +0800 Subject: [PATCH] opt: optimize shadow node and blur node enable --- src/animation/client.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/animation/client.h b/src/animation/client.h index 90b664b..bf8864b 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -255,8 +255,12 @@ void client_draw_shadow(Client *c) { return; if (!shadows || (!c->isfloating && shadow_only_floating)) { - wlr_scene_shadow_set_size(c->shadow, 0, 0); + if (c->shadow->node.enabled) + wlr_scene_node_set_enabled(&c->shadow->node, false); return; + } else { + if (c->scene_surface->node.enabled && !c->shadow->node.enabled) + wlr_scene_node_set_enabled(&c->shadow->node, true); } bool hit_no_border = check_hit_no_border(c);