mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +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
Notes:
sideshowbarker
2024-07-19 13:07:30 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/046f00f77e1
1 changed files with 1 additions and 3 deletions
|
@ -135,9 +135,7 @@ void CEventLoop::pump(WaitMode mode)
|
|||
|
||||
if (m_exit_requested) {
|
||||
LOCKER(m_lock);
|
||||
auto rejigged_event_queue = move(events);
|
||||
rejigged_event_queue.append(move(m_queued_events));
|
||||
m_queued_events = move(rejigged_event_queue);
|
||||
m_queued_events.prepend(move(events));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue