diff --git a/src/animation/client.h b/src/animation/client.h index 181f206..709a2cf 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -498,18 +498,11 @@ void client_apply_clip(Client *c, float factor) { bool should_render_client_surface = false; struct ivec2 offset; animationScale scale_data; + float opacity, percent; enum corner_location current_corner_location = set_client_corner_location(c); - float percent = - c->animation.action == OPEN && animation_fade_in && !c->nofadein - ? (double)c->animation.passed_frames / c->animation.total_frames - : 1.0; - float opacity = c->isfullscreen ? 1 - : c == selmon->sel ? c->focused_opacity - : c->unfocused_opacity; - int bw = (int)c->bw; if (!animations) { @@ -540,6 +533,14 @@ void client_apply_clip(Client *c, float factor) { return; } + percent = + c->animation.action == OPEN && animation_fade_in && !c->nofadein + ? (double)c->animation.passed_frames / c->animation.total_frames + : 1.0; + opacity = c->isfullscreen ? 1 + : c == selmon->sel ? c->focused_opacity + : c->unfocused_opacity; + // 获取窗口动画实时位置矩形 unsigned int width, height; client_actual_size(c, &width, &height);