From 1eac548ede6a99616d42999c87937533857862ba Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 12 Jul 2025 15:37:15 +0800 Subject: [PATCH] opt: Cut off the overly long layer ending zoom animation --- src/animation/layer.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/animation/layer.h b/src/animation/layer.h index 73b4464..0210cb2 100644 --- a/src/animation/layer.h +++ b/src/animation/layer.h @@ -209,6 +209,14 @@ void layer_scene_buffer_apply_effect(struct wlr_scene_buffer *buffer, int sx, struct wlr_surface *surface = scene_surface->surface; + if (scale_data->width_scale >= 0.99f) { + scale_data->width_scale = 1.0f; + } + + if (scale_data->height_scale >= 0.99f) { + scale_data->height_scale = 1.0f; + } + unsigned int surface_width = surface->current.width; unsigned int surface_height = surface->current.height; surface_width = scale_data->width_scale * surface_width;