1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

WindowServer+LibGUI: Send the window size along with Paint server messages.

This way GWindow doesn't need to do synchronous IPC to fetch the appropriate
size for the window's backing store. This is mostly only relevant during
live resize.
This commit is contained in:
Andreas Kling 2019-02-26 10:50:25 +01:00
parent 1effe70543
commit ae90043424
5 changed files with 12 additions and 5 deletions

View file

@ -56,15 +56,19 @@ public:
class GPaintEvent final : public GEvent {
public:
explicit GPaintEvent(const Rect& rect = Rect())
explicit GPaintEvent(const Rect& rect, const Size& window_size = Size())
: GEvent(GEvent::Paint)
, m_rect(rect)
, m_window_size(window_size)
{
}
const Rect& rect() const { return m_rect; }
Rect rect() const { return m_rect; }
Size window_size() const { return m_window_size; }
private:
Rect m_rect;
Size m_window_size;
};
class GResizeEvent final : public GEvent {