mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
WindowServer: Limit paint request rects to the visible window rect.
Don't send unnecessarily large paint requests to clients. This avoids some unnecessary work and fixes choppiness when dragging widgets outside the visible part of a VisualBuilder form.
This commit is contained in:
parent
b3f7f5436a
commit
84f96c393c
1 changed files with 1 additions and 1 deletions
|
@ -503,7 +503,7 @@ void WSClientConnection::handle_request(const WSAPIInvalidateRectRequest& reques
|
|||
}
|
||||
auto& window = *(*it).value;
|
||||
for (int i = 0; i < request.rects().size(); ++i)
|
||||
window.request_update(request.rects()[i]);
|
||||
window.request_update(request.rects()[i].intersected({ { }, window.size() }));
|
||||
}
|
||||
|
||||
void WSClientConnection::handle_request(const WSAPIDidFinishPaintingNotification& request)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue