mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-03 12:04:45 +00:00
LibGUI+WindowServer: Coalesce paints and resizes on the client side.
Only process paint and resize events on the GUI client side if those events have the latest up-to-date window size. This drastically reduces async overdraw during interactive resize.
This commit is contained in:
@@ -438,10 +438,8 @@ void WSClientConnection::handle_request(const WSAPIDidFinishPaintingNotification
|
||||
auto& window = *(*it).value;
|
||||
|
||||
if (!window.has_painted_since_last_resize()) {
|
||||
if (window.last_lazy_resize_rect().size() == request.rect().size()) {
|
||||
window.set_has_painted_since_last_resize(true);
|
||||
WSMessageLoop::the().post_message(window, make<WSResizeEvent>(window.last_lazy_resize_rect(), window.rect()));
|
||||
}
|
||||
window.set_has_painted_since_last_resize(true);
|
||||
WSMessageLoop::the().post_message(window, make<WSResizeEvent>(window.rect(), window.rect()));
|
||||
}
|
||||
WSWindowManager::the().invalidate(window, request.rect());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user