mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-01 22:58:44 -04:00
opt:Avoid the number of monitors affecting the animation speed
This commit is contained in:
parent
fc081824fb
commit
17225685c1
1 changed files with 9 additions and 1 deletions
10
maomao.c
10
maomao.c
|
|
@ -2194,7 +2194,15 @@ void client_set_pending_state(Client *c) {
|
|||
}
|
||||
|
||||
double output_frame_duration_ms(Client *c) {
|
||||
return 1000000.0 / c->mon->wlr_output->refresh;
|
||||
int32_t refresh_total = 0;
|
||||
Monitor *m;
|
||||
wl_list_for_each(m, &mons, link) {
|
||||
if (!m->wlr_output->enabled) {
|
||||
continue;
|
||||
}
|
||||
refresh_total += m->wlr_output->refresh;
|
||||
}
|
||||
return 1000000.0 / refresh_total;
|
||||
}
|
||||
|
||||
void client_commit(Client *c) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue