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

WindowServer+LibGUI: Add ability to set per-window icons.

The icons are passed around as filesystem paths for now, since the shared
memory bitmaps only support 2 sides.
This commit is contained in:
Andreas Kling 2019-04-13 16:59:55 +02:00
parent 7a74b76769
commit c09c114d77
19 changed files with 151 additions and 16 deletions

View file

@ -69,12 +69,13 @@ public:
class GWMWindowStateChangedEvent : public GWMEvent {
public:
GWMWindowStateChangedEvent(int client_id, int window_id, const String& title, const Rect& rect, bool is_active, GWindowType window_type, bool is_minimized)
GWMWindowStateChangedEvent(int client_id, int window_id, const String& title, const Rect& rect, bool is_active, GWindowType window_type, bool is_minimized, const String& icon_path)
: GWMEvent(GEvent::Type::WM_WindowStateChanged, client_id, window_id)
, m_title(title)
, m_icon_path(icon_path)
, m_rect(rect)
, m_active(is_active)
, m_window_type(window_type)
, m_active(is_active)
, m_minimized(is_minimized)
{
}
@ -84,12 +85,14 @@ public:
bool is_active() const { return m_active; }
GWindowType window_type() const { return m_window_type; }
bool is_minimized() const { return m_minimized; }
String icon_path() const { return m_icon_path; }
private:
String m_title;
String m_icon_path;
Rect m_rect;
bool m_active;
GWindowType m_window_type;
bool m_active;
bool m_minimized;
};