diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-20 16:11:45 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-20 16:11:45 +0200 |
commit | 046f00f77e19c8ec9afc7afc3eb5e1b66e0a8132 (patch) | |
tree | a676033a6768e26fb0ce80a75368d4796c4276ea /Libraries | |
parent | 67654ec529a1d4c00e20aabbc8565400ad0c0e06 (diff) | |
download | serenity-046f00f77e19c8ec9afc7afc3eb5e1b66e0a8132.zip |
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.
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibCore/CEventLoop.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Libraries/LibCore/CEventLoop.cpp b/Libraries/LibCore/CEventLoop.cpp index c0e7007a76..bc8514bb5f 100644 --- a/Libraries/LibCore/CEventLoop.cpp +++ b/Libraries/LibCore/CEventLoop.cpp @@ -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; } } |