LibCore: Always wait_for_events() when pumping the event loop

This fixes an issue where continuously posting new events to the queue
would keep the event loop saturated, causing it to ignore notifiers.

Since notifiers are part of the big select(), we always have to call
wait_for_events() even if there are pending events. We're already smart
enough to select() without a timeout if we already have pending events.
This commit is contained in:
Andreas Kling 2020-05-16 22:02:53 +02:00
parent b193670967
commit c3379e3734
Notes: sideshowbarker 2024-07-19 06:35:59 +09:00

View file

@ -320,8 +320,7 @@ int EventLoop::exec()
void EventLoop::pump(WaitMode mode)
{
if (m_queued_events.is_empty())
wait_for_event(mode);
wait_for_event(mode);
decltype(m_queued_events) events;
{