mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-09 08:21:27 -04:00
opt: optimize layer animaiton frame count in multi monitor
This commit is contained in:
parent
cd3689d557
commit
f712917159
4 changed files with 10 additions and 6 deletions
|
|
@ -445,7 +445,7 @@ void init_fadeout_layers(LayerSurface *l) {
|
|||
// 计算动画帧数
|
||||
fadeout_layer->animation.passed_frames = 0;
|
||||
fadeout_layer->animation.total_frames =
|
||||
fadeout_layer->animation.duration / output_frame_duration_ms();
|
||||
fadeout_layer->animation.duration / all_output_frame_duration_ms();
|
||||
|
||||
// 将节点插入到关闭动画链表中,屏幕刷新哪里会检查链表中是否有节点可以应用于动画
|
||||
wlr_scene_node_set_enabled(&fadeout_layer->scene->node, true);
|
||||
|
|
@ -531,7 +531,7 @@ void layer_commit(LayerSurface *l) {
|
|||
// 设置动画速度
|
||||
l->animation.passed_frames = 0;
|
||||
l->animation.total_frames =
|
||||
l->animation.duration / output_frame_duration_ms();
|
||||
l->animation.duration / output_frame_duration_ms(l->mon);
|
||||
|
||||
// 标记动画开始
|
||||
l->animation.running = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue