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

WindowServer+LibGUI: Pass window icons as shared buffers rather than paths.

Now that we support more than 2 clients per shared buffer, we can use them
for window icons. I didn't do that previously since it would have made the
Taskbar process unable to access the icons.

This opens up some nice possibilities for programmatically generated icons.
This commit is contained in:
Andreas Kling 2019-07-28 10:18:49 +02:00
parent 63619b9f7c
commit 841b2e5d13
21 changed files with 193 additions and 19 deletions

View file

@ -40,6 +40,7 @@ public:
WM_WindowStateChanged,
WM_WindowRectChanged,
WM_WindowIconChanged,
WM_WindowIconBitmapChanged,
__End_WM_Events,
};
@ -133,6 +134,23 @@ private:
String m_icon_path;
};
class GWMWindowIconBitmapChangedEvent : public GWMEvent {
public:
GWMWindowIconBitmapChangedEvent(int client_id, int window_id, int icon_buffer_id, const Size& icon_size)
: GWMEvent(GEvent::Type::WM_WindowIconBitmapChanged, client_id, window_id)
, m_icon_buffer_id(icon_buffer_id)
, m_icon_size(icon_size)
{
}
int icon_buffer_id() const { return m_icon_buffer_id; }
const Size& icon_size() const { return m_icon_size; }
private:
int m_icon_buffer_id;
Size m_icon_size;
};
class GMultiPaintEvent final : public GEvent {
public:
explicit GMultiPaintEvent(const Vector<Rect, 32>& rects, const Size& window_size)