mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibGUI: Don't nap in event loop if there are already queued events.
This mirrors the WindowServer fix.
This commit is contained in:
parent
d3dcb42227
commit
01a2035ecf
Notes:
sideshowbarker
2024-07-19 15:01:24 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/01a2035ecff
1 changed files with 1 additions and 1 deletions
|
@ -238,7 +238,7 @@ void GEventLoop::wait_for_event()
|
|||
}
|
||||
|
||||
struct timeval timeout = { 0, 0 };
|
||||
if (!m_timers.is_empty())
|
||||
if (!m_timers.is_empty() && m_queued_events.is_empty())
|
||||
get_next_timer_expiration(timeout);
|
||||
ASSERT(m_unprocessed_messages.is_empty());
|
||||
int rc = select(max_fd + 1, &rfds, &wfds, nullptr, (m_queued_events.is_empty() && m_timers.is_empty()) ? nullptr : &timeout);
|
||||
|
|
Loading…
Reference in a new issue