mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibGUI: Turn a heap-allocated event into a stack-allocated one
This commit is contained in:
parent
6d27915f4b
commit
5f0d24cab2
Notes:
sideshowbarker
2024-07-19 04:45:07 +09:00
Author: https://github.com/awesomekling
Commit: 5f0d24cab2
1 changed files with 4 additions and 2 deletions
|
@ -303,8 +303,10 @@ void Window::event(Core::Event& event)
|
||||||
rects.append({ {}, paint_event.window_size() });
|
rects.append({ {}, paint_event.window_size() });
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& rect : rects)
|
for (auto& rect : rects) {
|
||||||
m_main_widget->dispatch_event(*make<PaintEvent>(rect), this);
|
PaintEvent paint_event(rect);
|
||||||
|
m_main_widget->dispatch_event(paint_event, this);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_double_buffering_enabled)
|
if (m_double_buffering_enabled)
|
||||||
flip(rects);
|
flip(rects);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue