summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibGUI/Event.h11
-rw-r--r--Libraries/LibGUI/WindowServerConnection.cpp2
2 files changed, 11 insertions, 2 deletions
diff --git a/Libraries/LibGUI/Event.h b/Libraries/LibGUI/Event.h
index 1fe9205892..f5ab95ce14 100644
--- a/Libraries/LibGUI/Event.h
+++ b/Libraries/LibGUI/Event.h
@@ -114,31 +114,40 @@ public:
class WMWindowStateChangedEvent : public WMEvent {
public:
- WMWindowStateChangedEvent(int client_id, int window_id, const StringView& title, const Gfx::IntRect& rect, bool is_active, WindowType window_type, bool is_minimized, bool is_frameless, int progress)
+ WMWindowStateChangedEvent(int client_id, int window_id, int parent_client_id, int parent_window_id, const StringView& title, const Gfx::IntRect& rect, bool is_active, bool is_modal, WindowType window_type, bool is_minimized, bool is_frameless, int progress)
: WMEvent(Event::Type::WM_WindowStateChanged, client_id, window_id)
+ , m_parent_client_id(parent_client_id)
+ , m_parent_window_id(parent_window_id)
, m_title(title)
, m_rect(rect)
, m_window_type(window_type)
, m_active(is_active)
+ , m_modal(is_modal)
, m_minimized(is_minimized)
, m_frameless(is_frameless)
, m_progress(progress)
{
}
+ int parent_client_id() const { return m_parent_client_id; }
+ int parent_window_id() const { return m_parent_window_id; }
String title() const { return m_title; }
Gfx::IntRect rect() const { return m_rect; }
bool is_active() const { return m_active; }
+ bool is_modal() const { return m_modal; }
WindowType window_type() const { return m_window_type; }
bool is_minimized() const { return m_minimized; }
bool is_frameless() const { return m_frameless; }
int progress() const { return m_progress; }
private:
+ int m_parent_client_id;
+ int m_parent_window_id;
String m_title;
Gfx::IntRect m_rect;
WindowType m_window_type;
bool m_active;
+ bool m_modal;
bool m_minimized;
bool m_frameless;
int m_progress;
diff --git a/Libraries/LibGUI/WindowServerConnection.cpp b/Libraries/LibGUI/WindowServerConnection.cpp
index 1f29afe18a..35eae09015 100644
--- a/Libraries/LibGUI/WindowServerConnection.cpp
+++ b/Libraries/LibGUI/WindowServerConnection.cpp
@@ -273,7 +273,7 @@ void WindowServerConnection::handle(const Messages::WindowClient::MenuItemActiva
void WindowServerConnection::handle(const Messages::WindowClient::WM_WindowStateChanged& message)
{
if (auto* window = Window::from_window_id(message.wm_id()))
- Core::EventLoop::current().post_event(*window, make<WMWindowStateChangedEvent>(message.client_id(), message.window_id(), message.title(), message.rect(), message.is_active(), static_cast<WindowType>(message.window_type()), message.is_minimized(), message.is_frameless(), message.progress()));
+ Core::EventLoop::current().post_event(*window, make<WMWindowStateChangedEvent>(message.client_id(), message.window_id(), message.parent_client_id(), message.parent_window_id(), message.title(), message.rect(), message.is_active(), message.is_modal(), static_cast<WindowType>(message.window_type()), message.is_minimized(), message.is_frameless(), message.progress()));
}
void WindowServerConnection::handle(const Messages::WindowClient::WM_WindowRectChanged& message)