From 65d2642064a0f0f82e02d737dda4f9284bb4adfb Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 29 Jun 2025 13:28:00 +0800 Subject: [PATCH] fix: noaime for layershell and not use animation for bottom and background layer --- src/maomao.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/maomao.c b/src/maomao.c index 56d9e1a..4e7ebc5 100644 --- a/src/maomao.c +++ b/src/maomao.c @@ -1003,13 +1003,6 @@ void fadeout_client_animation_next_tick(Client *c) { void layer_animation_next_tick(LayerSurface *l) { - if (!animations || l->noanim) { - wlr_scene_node_set_position(&l->scene->node, l->geom.x, l->geom.y); - l->animation.passed_frames = 0; - l->animation.running = false; - l->need_output_flush = false; - } - double animation_passed = (double)l->animation.passed_frames / l->animation.total_frames; @@ -1493,7 +1486,7 @@ bool layer_draw_frame(LayerSurface *l) { return false; } - if (animations && l->animation.running) { + if (animations && l->animation.running && !l->noanim) { layer_animation_next_tick(l); } else { wlr_scene_node_set_position(&l->scene->node, l->geom.x, l->geom.y); @@ -7363,6 +7356,10 @@ void init_fadeout_layers(LayerSurface *l) { return; } + if (l->layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM || + l->layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND) + return; + LayerSurface *fadeout_layer = ecalloc(1, sizeof(*fadeout_layer)); wlr_scene_node_set_enabled(&l->scene->node, true);