1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

WindowServer: Stop tracking whether clients have painted since last resize.

This optimization is no longer needed now that clients coalesce resizes
on their own. :^)
This commit is contained in:
Andreas Kling 2019-04-10 15:46:56 +02:00
parent 55811f233f
commit cfab81a961
3 changed files with 1 additions and 14 deletions

View file

@ -436,11 +436,6 @@ void WSClientConnection::handle_request(const WSAPIDidFinishPaintingNotification
return;
}
auto& window = *(*it).value;
if (!window.has_painted_since_last_resize()) {
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());
}

View file

@ -106,9 +106,6 @@ public:
bool has_alpha_channel() const { return m_has_alpha_channel; }
void set_has_alpha_channel(bool value) { m_has_alpha_channel = value; }
bool has_painted_since_last_resize() const { return m_has_painted_since_last_resize; }
void set_has_painted_since_last_resize(bool b) { m_has_painted_since_last_resize = b; }
Size size_increment() const { return m_size_increment; }
void set_size_increment(const Size& increment) { m_size_increment = increment; }
@ -138,7 +135,6 @@ private:
bool m_automatic_cursor_tracking_enabled { false };
bool m_visible { true };
bool m_has_alpha_channel { false };
bool m_has_painted_since_last_resize { false };
bool m_modal { false };
bool m_resizable { false };
bool m_listens_to_wm_events { false };

View file

@ -491,7 +491,6 @@ void WSWindowManager::start_window_resize(WSWindow& window, const WSMouseEvent&
m_resize_window = window.make_weak_ptr();;
m_resize_origin = event.position();
m_resize_window_original_rect = window.rect();
m_resize_window->set_has_painted_since_last_resize(true);
invalidate(window);
}
@ -611,10 +610,7 @@ bool WSWindowManager::process_ongoing_window_resize(const WSMouseEvent& event, W
new_rect.to_string().characters());
#endif
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);
WSMessageLoop::the().post_message(*m_resize_window, make<WSResizeEvent>(old_rect, new_rect));
}
return true;
}