diff options
-rw-r--r-- | Libraries/LibGUI/Window.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Libraries/LibGUI/Window.cpp b/Libraries/LibGUI/Window.cpp index 5c5fff730b..ce7685451b 100644 --- a/Libraries/LibGUI/Window.cpp +++ b/Libraries/LibGUI/Window.cpp @@ -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); |