1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:57:35 +00:00

Taskbar: Don't create buttons for modal windows

Since the user can't really do much with windows that are blocked
by a modal window, there is no point in showing multiple buttons.
This commit is contained in:
Tom 2020-07-15 17:44:42 -06:00 committed by Andreas Kling
parent bbdf0665fc
commit a269e3e573
5 changed files with 114 additions and 24 deletions

View file

@ -30,6 +30,7 @@
class WindowIdentifier {
public:
WindowIdentifier() = default;
WindowIdentifier(int client_id, int window_id)
: m_client_id(client_id)
, m_window_id(window_id)
@ -44,6 +45,11 @@ public:
return m_client_id == other.m_client_id && m_window_id == other.m_window_id;
}
bool is_valid() const
{
return m_client_id != -1 && m_window_id != -1;
}
private:
int m_client_id { -1 };
int m_window_id { -1 };