diff --git a/Libraries/LibGUI/GWindowServerConnection.cpp b/Libraries/LibGUI/GWindowServerConnection.cpp index fde0ee7064..51b7492a2b 100644 --- a/Libraries/LibGUI/GWindowServerConnection.cpp +++ b/Libraries/LibGUI/GWindowServerConnection.cpp @@ -48,13 +48,8 @@ void GWindowServerConnection::handle(const WindowClient::Paint& message) #ifdef GEVENTLOOP_DEBUG dbgprintf("WID=%d Paint\n", message.window_id()); #endif - if (auto* window = GWindow::from_window_id(message.window_id())) { - Vector rects; - for (auto& r : message.rects()) { - rects.append(r); - } - CEventLoop::current().post_event(*window, make(rects, message.window_size())); - } + if (auto* window = GWindow::from_window_id(message.window_id())) + CEventLoop::current().post_event(*window, make(message.rects(), message.window_size())); } void GWindowServerConnection::handle(const WindowClient::WindowResized& message) diff --git a/Servers/WindowServer/WSClientConnection.cpp b/Servers/WindowServer/WSClientConnection.cpp index 98793c379e..075fd2b257 100644 --- a/Servers/WindowServer/WSClientConnection.cpp +++ b/Servers/WindowServer/WSClientConnection.cpp @@ -436,12 +436,7 @@ void WSClientConnection::post_paint_message(WSWindow& window) if (window.is_minimized() || window.is_occluded()) return; - Vector rects; - rects.ensure_capacity(rect_set.size()); - for (auto& r : rect_set.rects()) { - rects.append(r); - } - post_message(WindowClient::Paint(window.window_id(), window.size(), rects)); + post_message(WindowClient::Paint(window.window_id(), window.size(), rect_set.rects())); } void WSClientConnection::handle(const WindowServer::InvalidateRect& message)