diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-02 12:15:48 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-02 12:24:23 +0200 |
commit | 3331098aee05f1e27039b60fb7eb5cda01fffac1 (patch) | |
tree | 85a80120c6185eaea8ce26dec4142404df40ae23 /Libraries | |
parent | c9321b4f009a4e8a143d55e30ba5e0a4718785ff (diff) | |
download | serenity-3331098aee05f1e27039b60fb7eb5cda01fffac1.zip |
WindowServer+LibGUI+Taskbar: Don't include frameless windows in lists
Frameless windows don't need to show up in the taskbar or the switcher.
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibGUI/Event.h | 5 | ||||
-rw-r--r-- | Libraries/LibGUI/WindowServerConnection.cpp | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Libraries/LibGUI/Event.h b/Libraries/LibGUI/Event.h index a2240a1659..6c2374ccfb 100644 --- a/Libraries/LibGUI/Event.h +++ b/Libraries/LibGUI/Event.h @@ -110,13 +110,14 @@ public: class WMWindowStateChangedEvent : public WMEvent { public: - WMWindowStateChangedEvent(int client_id, int window_id, const StringView& title, const Gfx::Rect& rect, bool is_active, WindowType window_type, bool is_minimized) + WMWindowStateChangedEvent(int client_id, int window_id, const StringView& title, const Gfx::Rect& rect, bool is_active, WindowType window_type, bool is_minimized, bool is_frameless) : WMEvent(Event::Type::WM_WindowStateChanged, client_id, window_id) , m_title(title) , m_rect(rect) , m_window_type(window_type) , m_active(is_active) , m_minimized(is_minimized) + , m_frameless(is_frameless) { } @@ -125,6 +126,7 @@ public: bool is_active() const { return m_active; } WindowType window_type() const { return m_window_type; } bool is_minimized() const { return m_minimized; } + bool is_frameless() const { return m_frameless; } private: String m_title; @@ -132,6 +134,7 @@ private: WindowType m_window_type; bool m_active; bool m_minimized; + bool m_frameless; }; class WMWindowRectChangedEvent : public WMEvent { diff --git a/Libraries/LibGUI/WindowServerConnection.cpp b/Libraries/LibGUI/WindowServerConnection.cpp index 64fc5f2534..036cf64869 100644 --- a/Libraries/LibGUI/WindowServerConnection.cpp +++ b/Libraries/LibGUI/WindowServerConnection.cpp @@ -232,7 +232,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())); + 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())); } void WindowServerConnection::handle(const Messages::WindowClient::WM_WindowRectChanged& message) |