mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-01 07:16:11 -04:00
fix: avoid opacity exceeds the threshold due to overshot animation curve
This commit is contained in:
parent
376f4b2ab1
commit
dfc940fd5c
1 changed files with 1 additions and 0 deletions
|
|
@ -4515,6 +4515,7 @@ void scene_buffer_apply_opacity(struct wlr_scene_buffer *buffer, int32_t sx,
|
||||||
}
|
}
|
||||||
|
|
||||||
void client_set_opacity(Client *c, double opacity) {
|
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,
|
wlr_scene_node_for_each_buffer(&c->scene_surface->node,
|
||||||
scene_buffer_apply_opacity, &opacity);
|
scene_buffer_apply_opacity, &opacity);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue