From cbc344ab88cc0eef34e8657fbbd7004459a8b3ce Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Thu, 26 Feb 2026 08:29:27 +0800 Subject: [PATCH] fix: avoid opacity exceeds the threshold due to overshot animation curve --- src/mango.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mango.c b/src/mango.c index d4cc1fb..4be08c5 100644 --- a/src/mango.c +++ b/src/mango.c @@ -4517,6 +4517,7 @@ void scene_buffer_apply_opacity(struct wlr_scene_buffer *buffer, int32_t sx, } void client_set_opacity(Client *c, double opacity) { + opacity = CLAMP_FLOAT(opacity, 0.0f, 1.0f); wlr_scene_node_for_each_buffer(&c->scene_surface->node, scene_buffer_apply_opacity, &opacity); }