mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-31 07:11:28 -04:00
opt: set fadein blur to no blur_optimize
This commit is contained in:
parent
eb5d8f6d86
commit
af8c480b06
2 changed files with 16 additions and 1 deletions
|
|
@ -1146,6 +1146,16 @@ bool client_apply_focus_opacity(Client *c) {
|
||||||
target_opacity = opacity;
|
target_opacity = opacity;
|
||||||
}
|
}
|
||||||
client_set_opacity(c, target_opacity);
|
client_set_opacity(c, target_opacity);
|
||||||
|
if (blur && !c->noblur && !blur_optimized) {
|
||||||
|
wlr_scene_blur_set_strength(
|
||||||
|
c->blur, MIN(percent * (1.0 - fadein_begin_opacity) +
|
||||||
|
fadein_begin_opacity,
|
||||||
|
1.0));
|
||||||
|
wlr_scene_blur_set_alpha(
|
||||||
|
c->blur, MIN(percent * (1.0 - fadein_begin_opacity) +
|
||||||
|
fadein_begin_opacity,
|
||||||
|
1.0));
|
||||||
|
}
|
||||||
} else if (animations && c->opacity_animation.running) {
|
} else if (animations && c->opacity_animation.running) {
|
||||||
|
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
|
|
|
||||||
|
|
@ -326,9 +326,14 @@ void layer_animation_next_tick(LayerSurface *l) {
|
||||||
animation_passed * (1.0 - fadein_begin_opacity),
|
animation_passed * (1.0 - fadein_begin_opacity),
|
||||||
1.0f);
|
1.0f);
|
||||||
|
|
||||||
if (animation_fade_in)
|
if (animation_fade_in) {
|
||||||
|
if (blur && !l->noblur && !blur_optimized) {
|
||||||
|
wlr_scene_blur_set_strength(l->blur, opacity);
|
||||||
|
wlr_scene_blur_set_alpha(l->blur, opacity);
|
||||||
|
}
|
||||||
wlr_scene_node_for_each_buffer(&l->scene->node,
|
wlr_scene_node_for_each_buffer(&l->scene->node,
|
||||||
scene_buffer_apply_opacity, &opacity);
|
scene_buffer_apply_opacity, &opacity);
|
||||||
|
}
|
||||||
|
|
||||||
wlr_scene_node_set_position(&l->scene->node, x, y);
|
wlr_scene_node_set_position(&l->scene->node, x, y);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue