mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:27:35 +00:00
LibGUI+Taskbar+WindowServer: Remove mode and parent methods from Taskbar
Taskbar only needs a modeless parent and the activity state of the modal chain to update buttons.
This commit is contained in:
parent
d54dc22362
commit
35a230f974
9 changed files with 27 additions and 83 deletions
|
@ -19,12 +19,11 @@ ConnectionToWindowManagerServer& ConnectionToWindowManagerServer::the()
|
|||
}
|
||||
|
||||
void ConnectionToWindowManagerServer::window_state_changed(i32 wm_id, i32 client_id, i32 window_id,
|
||||
i32 parent_client_id, i32 parent_window_id, u32 workspace_row, u32 workspace_column,
|
||||
bool is_active, bool is_minimized, bool is_modal, bool is_frameless, i32 window_type,
|
||||
String const& title, Gfx::IntRect const& rect, Optional<i32> const& progress)
|
||||
u32 workspace_row, u32 workspace_column, bool is_active, bool is_minimized, bool is_frameless,
|
||||
i32 window_type, String const& title, Gfx::IntRect const& rect, Optional<i32> const& progress)
|
||||
{
|
||||
if (auto* window = Window::from_window_id(wm_id))
|
||||
Core::EventLoop::current().post_event(*window, make<WMWindowStateChangedEvent>(client_id, window_id, parent_client_id, parent_window_id, title, rect, workspace_row, workspace_column, is_active, is_modal, static_cast<WindowType>(window_type), is_minimized, is_frameless, progress));
|
||||
Core::EventLoop::current().post_event(*window, make<WMWindowStateChangedEvent>(client_id, window_id, title, rect, workspace_row, workspace_column, is_active, static_cast<WindowType>(window_type), is_minimized, is_frameless, progress));
|
||||
}
|
||||
|
||||
void ConnectionToWindowManagerServer::applet_area_size_changed(i32 wm_id, Gfx::IntSize const& size)
|
||||
|
|
|
@ -28,7 +28,7 @@ private:
|
|||
}
|
||||
|
||||
virtual void window_removed(i32, i32, i32) override;
|
||||
virtual void window_state_changed(i32, i32, i32, i32, i32, u32, u32, bool, bool, bool, bool, i32, String const&, Gfx::IntRect const&, Optional<i32> const&) override;
|
||||
virtual void window_state_changed(i32, i32, i32, u32, u32, bool, bool, bool, i32, String const&, Gfx::IntRect const&, Optional<i32> const&) override;
|
||||
virtual void window_icon_bitmap_changed(i32, i32, i32, Gfx::ShareableBitmap const&) override;
|
||||
virtual void window_rect_changed(i32, i32, i32, Gfx::IntRect const&) override;
|
||||
virtual void applet_area_size_changed(i32, Gfx::IntSize const&) override;
|
||||
|
|
|
@ -164,29 +164,23 @@ public:
|
|||
|
||||
class WMWindowStateChangedEvent : public WMEvent {
|
||||
public:
|
||||
WMWindowStateChangedEvent(int client_id, int window_id, int parent_client_id, int parent_window_id, StringView title, Gfx::IntRect const& rect, unsigned workspace_row, unsigned workspace_column, bool is_active, bool is_modal, WindowType window_type, bool is_minimized, bool is_frameless, Optional<int> progress)
|
||||
WMWindowStateChangedEvent(int client_id, int window_id, StringView title, Gfx::IntRect const& rect, unsigned workspace_row, unsigned workspace_column, bool is_active, WindowType window_type, bool is_minimized, bool is_frameless, Optional<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_workspace_row(workspace_row)
|
||||
, m_workspace_column(workspace_column)
|
||||
, 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 const& title() const { return m_title; }
|
||||
Gfx::IntRect const& 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; }
|
||||
|
@ -195,15 +189,12 @@ public:
|
|||
unsigned workspace_column() const { return m_workspace_column; }
|
||||
|
||||
private:
|
||||
int m_parent_client_id;
|
||||
int m_parent_window_id;
|
||||
String m_title;
|
||||
Gfx::IntRect m_rect;
|
||||
WindowType m_window_type;
|
||||
unsigned m_workspace_row;
|
||||
unsigned m_workspace_column;
|
||||
bool m_active;
|
||||
bool m_modal;
|
||||
bool m_minimized;
|
||||
bool m_frameless;
|
||||
Optional<int> m_progress;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue