1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:57:44 +00:00

WindowServer: Give windows a "background color" to use for missing parts.

When resizing a window, we often end up having to paint some part of it
without coverage in the current backing store. This patch makes those cases
look nicer by having a fallback background color for each window, passed
along with the CreateWindow client message.
This commit is contained in:
Andreas Kling 2019-04-10 14:29:47 +02:00
parent 30e2d62c38
commit d4818dd2dd
9 changed files with 30 additions and 2 deletions

View file

@ -19,6 +19,9 @@ public:
WSWindow(WSMessageReceiver&, WSWindowType);
virtual ~WSWindow() override;
Color background_color() const { return m_background_color; }
void set_background_color(Color color) { m_background_color = color; }
bool is_minimized() const { return m_minimized; }
void set_minimized(bool);
@ -153,4 +156,5 @@ private:
Retained<GraphicsBitmap> m_icon;
RetainPtr<WSCursor> m_override_cursor;
WSWindowFrame m_frame;
Color m_background_color { Color::LightGray };
};