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:
Andreas Kling 2019-04-10 15:39:28 +02:00
commit 55811f233f
Notes: sideshowbarker 2024-07-19 14:46:28 +09:00
5 changed files with 50 additions and 13 deletions

View file

@ -613,10 +613,6 @@ bool WSWindowManager::process_ongoing_window_resize(const WSMouseEvent& event, W
m_resize_window->set_rect(new_rect);
if (m_resize_window->has_painted_since_last_resize()) {
m_resize_window->set_has_painted_since_last_resize(false);
#ifdef RESIZE_DEBUG
dbgprintf("[WM] I'm gonna wait for %s\n", new_rect.to_string().characters());
#endif
m_resize_window->set_last_lazy_resize_rect(new_rect);
WSMessageLoop::the().post_message(*m_resize_window, make<WSResizeEvent>(old_rect, new_rect));
}
return true;