mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-01 01:40:19 -05:00
opt: ensure auto schedule next frame when animaiton not end
This commit is contained in:
parent
d2894f0bab
commit
67b37559a8
4 changed files with 35 additions and 10 deletions
|
|
@ -840,8 +840,7 @@ void init_fadeout_client(Client *c) {
|
|||
wl_list_insert(&fadeout_clients, &fadeout_cient->fadeout_link);
|
||||
|
||||
// 请求刷新屏幕
|
||||
if (c->mon)
|
||||
wlr_output_schedule_frame(c->mon->wlr_output);
|
||||
request_fresh_all_monitors();
|
||||
}
|
||||
|
||||
void client_commit(Client *c) {
|
||||
|
|
@ -860,8 +859,7 @@ void client_commit(Client *c) {
|
|||
c->animation.should_animate = false;
|
||||
}
|
||||
// 请求刷新屏幕
|
||||
if (c->mon)
|
||||
wlr_output_schedule_frame(c->mon->wlr_output);
|
||||
request_fresh_all_monitors();
|
||||
}
|
||||
|
||||
void client_set_pending_state(Client *c) {
|
||||
|
|
|
|||
|
|
@ -250,3 +250,13 @@ struct wlr_scene_tree *wlr_scene_tree_snapshot(struct wlr_scene_node *node,
|
|||
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
void request_fresh_all_monitors(void) {
|
||||
Monitor *m = NULL;
|
||||
wl_list_for_each(m, &mons, link) {
|
||||
if (!m->wlr_output->enabled) {
|
||||
continue;
|
||||
}
|
||||
wlr_output_schedule_frame(m->wlr_output);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue