1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 01:51:03 +09:00

LibGUI: Turn a heap-allocated event into a stack-allocated one

This commit is contained in:
Andreas Kling 2020-07-16 20:44:49 +02:00
parent 6d27915f4b
commit 5f0d24cab2
Notes: sideshowbarker 2024-07-19 04:45:07 +09:00

View file

@ -303,8 +303,10 @@ void Window::event(Core::Event& event)
rects.append({ {}, paint_event.window_size() });
}
for (auto& rect : rects)
m_main_widget->dispatch_event(*make<PaintEvent>(rect), this);
for (auto& rect : rects) {
PaintEvent paint_event(rect);
m_main_widget->dispatch_event(paint_event, this);
}
if (m_double_buffering_enabled)
flip(rects);