mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
WindowServer: Generate a separate WM event for window icon changes.
This commit is contained in:
parent
c4c7f224d5
commit
c931eaa22c
12 changed files with 95 additions and 23 deletions
|
@ -31,6 +31,7 @@ public:
|
|||
WindowCloseRequest,
|
||||
WM_WindowRemoved,
|
||||
WM_WindowStateChanged,
|
||||
WM_WindowIconChanged,
|
||||
};
|
||||
|
||||
GEvent() { }
|
||||
|
@ -69,10 +70,9 @@ 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, const String& icon_path)
|
||||
GWMWindowStateChangedEvent(int client_id, int window_id, const String& title, const Rect& rect, bool is_active, GWindowType window_type, bool is_minimized)
|
||||
: GWMEvent(GEvent::Type::WM_WindowStateChanged, client_id, window_id)
|
||||
, m_title(title)
|
||||
, m_icon_path(icon_path)
|
||||
, m_rect(rect)
|
||||
, m_window_type(window_type)
|
||||
, m_active(is_active)
|
||||
|
@ -85,17 +85,29 @@ 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;
|
||||
GWindowType m_window_type;
|
||||
bool m_active;
|
||||
bool m_minimized;
|
||||
};
|
||||
|
||||
class GWMWindowIconChangedEvent : public GWMEvent {
|
||||
public:
|
||||
GWMWindowIconChangedEvent(int client_id, int window_id, const String& icon_path)
|
||||
: GWMEvent(GEvent::Type::WM_WindowIconChanged, client_id, window_id)
|
||||
, m_icon_path(icon_path)
|
||||
{
|
||||
}
|
||||
|
||||
String icon_path() const { return m_icon_path; }
|
||||
|
||||
private:
|
||||
String m_icon_path;
|
||||
};
|
||||
|
||||
class GPaintEvent final : public GEvent {
|
||||
public:
|
||||
explicit GPaintEvent(const Rect& rect, const Size& window_size = Size())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue