mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 21:37:34 +00:00
CEventLoop: Use Vector::prepend(Vector&&) to shuffle events to outer loop.
When exiting a nested event loop, we prepend any unprocessed events to the outer loop's event queue.
This commit is contained in:
parent
67654ec529
commit
046f00f77e
1 changed files with 1 additions and 3 deletions
|
@ -135,9 +135,7 @@ void CEventLoop::pump(WaitMode mode)
|
||||||
|
|
||||||
if (m_exit_requested) {
|
if (m_exit_requested) {
|
||||||
LOCKER(m_lock);
|
LOCKER(m_lock);
|
||||||
auto rejigged_event_queue = move(events);
|
m_queued_events.prepend(move(events));
|
||||||
rejigged_event_queue.append(move(m_queued_events));
|
|
||||||
m_queued_events = move(rejigged_event_queue);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue