1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

WindowServer: Add window icons. Every window has the same icon for now.

The icons show up both in the title bars and in the window switcher.
Eventually I'd like to be able to minimize to icon, and maybe even have
myself a taskbar.
This commit is contained in:
Andreas Kling 2019-03-06 23:03:36 +01:00
parent 3729f7cc6a
commit 67ee579113
5 changed files with 34 additions and 5 deletions

View file

@ -78,6 +78,9 @@ public:
Size base_size() const { return m_base_size; }
void set_base_size(const Size& size) { m_base_size = size; }
const GraphicsBitmap& icon() const { return *m_icon; }
void set_icon(Retained<GraphicsBitmap>&& icon) { m_icon = move(icon); }
// For InlineLinkedList.
// FIXME: Maybe make a ListHashSet and then WSWindowManager can just use that.
WSWindow* m_next { nullptr };
@ -99,4 +102,5 @@ private:
Rect m_last_lazy_resize_rect;
Size m_size_increment;
Size m_base_size;
Retained<GraphicsBitmap> m_icon;
};