1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:47:45 +00:00

LibGUI+Taskbar+WindowServer: Prevent minimization when blocked

This was intentionally enabled with WindowModes as a new Taskbar
convenience, but on second thought, it doesn't add up visually.

Taskbar buttons show blockers' context menus when available,
which is a bit confusing when the window isn't visible. The
modeless window's disabled context menu options and inactive title
bar also contradict the button. So, this patch reenables the
restriction for now. Blocking modals you don't want to answer to
immediately can still be tucked away on another workspace.
This commit is contained in:
thankyouverycool 2022-08-25 14:03:49 -04:00 committed by Andreas Kling
parent 18b111b802
commit d815f659cc
7 changed files with 18 additions and 8 deletions

View file

@ -164,7 +164,7 @@ public:
class WMWindowStateChangedEvent : public WMEvent {
public:
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)
WMWindowStateChangedEvent(int client_id, int window_id, StringView title, Gfx::IntRect const& rect, unsigned workspace_row, unsigned workspace_column, bool is_active, bool is_blocked, WindowType window_type, bool is_minimized, bool is_frameless, Optional<int> progress)
: WMEvent(Event::Type::WM_WindowStateChanged, client_id, window_id)
, m_title(title)
, m_rect(rect)
@ -172,6 +172,7 @@ public:
, m_workspace_row(workspace_row)
, m_workspace_column(workspace_column)
, m_active(is_active)
, m_blocked(is_blocked)
, m_minimized(is_minimized)
, m_frameless(is_frameless)
, m_progress(progress)
@ -181,6 +182,7 @@ public:
String const& title() const { return m_title; }
Gfx::IntRect const& rect() const { return m_rect; }
bool is_active() const { return m_active; }
bool is_blocked() const { return m_blocked; }
WindowType window_type() const { return m_window_type; }
bool is_minimized() const { return m_minimized; }
bool is_frameless() const { return m_frameless; }
@ -195,6 +197,7 @@ private:
unsigned m_workspace_row;
unsigned m_workspace_column;
bool m_active;
bool m_blocked;
bool m_minimized;
bool m_frameless;
Optional<int> m_progress;