mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-27 01:40:22 -05:00
fix: avoid opacity exceeds the threshold due to overshot animation curve
This commit is contained in:
parent
1dac96b426
commit
cbc344ab88
1 changed files with 1 additions and 0 deletions
|
|
@ -4517,6 +4517,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