1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

WindowServer: Don't spam clients with resize events.

Wait for them to finish a paint, then send them a new resize event.
The exception is when releasing the mouse button to end the resize.
Then we send a new resize event right away.
This commit is contained in:
Andreas Kling 2019-02-20 15:50:05 +01:00
parent 59b8183c4b
commit d054fbee91
3 changed files with 10 additions and 2 deletions

View file

@ -63,6 +63,9 @@ public:
bool has_alpha_channel() const { return m_has_alpha_channel; }
void set_has_alpha_channel(bool value) { m_has_alpha_channel = value; }
void set_has_painted_since_last_resize(bool b) { m_has_painted_since_last_resize = b; }
bool has_painted_since_last_resize() const { return m_has_painted_since_last_resize; }
// For InlineLinkedList.
// FIXME: Maybe make a ListHashSet and then WSWindowManager can just use that.
WSWindow* m_next { nullptr };
@ -76,6 +79,7 @@ private:
bool m_global_cursor_tracking_enabled { false };
bool m_visible { true };
bool m_has_alpha_channel { false };
bool m_has_painted_since_last_resize { false };
WSMenu* m_menu { nullptr };
RetainPtr<GraphicsBitmap> m_backing;
int m_window_id { -1 };