mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibCore: Don't replay last handled event when leaving nested event loop
The event that triggered the exit from an inner event loop would always get re-delivered in the outer event loop due to a silly off-by-one mistake when transferring pending events between loops.
This commit is contained in:
parent
9eec63e471
commit
eeec1c1293
Notes:
sideshowbarker
2024-07-19 07:58:10 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/eeec1c12937
1 changed files with 1 additions and 1 deletions
|
@ -365,7 +365,7 @@ void EventLoop::pump(WaitMode mode)
|
|||
#endif
|
||||
decltype(m_queued_events) new_event_queue;
|
||||
new_event_queue.ensure_capacity(m_queued_events.size() + events.size());
|
||||
for (; i < events.size(); ++i)
|
||||
for (++i; i < events.size(); ++i)
|
||||
new_event_queue.unchecked_append(move(events[i]));
|
||||
new_event_queue.append(move(m_queued_events));
|
||||
m_queued_events = move(new_event_queue);
|
||||
|
|
Loading…
Reference in a new issue