mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
WindowServer+LibGUI: Simplify handling of paint event rects
Now that Vector<T> is convertible to Vector<T, n>, we don't have to manually copy the paint event rectangles.
This commit is contained in:
parent
6dec88c7fa
commit
2d244a70a1
2 changed files with 3 additions and 13 deletions
|
@ -436,12 +436,7 @@ void WSClientConnection::post_paint_message(WSWindow& window)
|
|||
if (window.is_minimized() || window.is_occluded())
|
||||
return;
|
||||
|
||||
Vector<Rect> 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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue