Fix event loop continuously ticking every input_delay seconds even when no input is available
This commit is contained in:
parent
fa11858a72
commit
fd7d0f8787
1 changed files with 5 additions and 3 deletions
|
|
@ -441,9 +441,11 @@ do_parse(ChildMonitor *self, Screen *screen, monotonic_t now, bool flush) {
|
|||
if (pd.input_read) {
|
||||
if (pd.write_space_created) wakeup_io_loop(self, false);
|
||||
}
|
||||
if (pd.input_read && screen->paused_rendering.expires_at) {
|
||||
set_maximum_wait(MAX(0, screen->paused_rendering.expires_at - now));
|
||||
} else set_maximum_wait(OPT(input_delay) - pd.time_since_new_input);
|
||||
if (pd.input_read) {
|
||||
if (screen->paused_rendering.expires_at) {
|
||||
set_maximum_wait(MAX(0, screen->paused_rendering.expires_at - now));
|
||||
} else set_maximum_wait(OPT(input_delay) - pd.time_since_new_input);
|
||||
}
|
||||
return pd.input_read;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue