diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-04-04 16:23:23 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-04-04 16:23:23 +0200 |
commit | 64a5abf8db3694cc73b4d822f482f1fa4dde8647 (patch) | |
tree | 5677e8b2ababb39139645fec4e32dd1b33ad68c4 /Applications/Taskbar | |
parent | 82b02ed82beeac8f0173f3fb4d7d7286c437c381 (diff) | |
download | serenity-64a5abf8db3694cc73b4d822f482f1fa4dde8647.zip |
Taskbar: Only include "Normal" windows in the taskbar window list.
Diffstat (limited to 'Applications/Taskbar')
-rw-r--r-- | Applications/Taskbar/TaskbarWindow.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Applications/Taskbar/TaskbarWindow.cpp b/Applications/Taskbar/TaskbarWindow.cpp index 69e5261da2..eb332efdf9 100644 --- a/Applications/Taskbar/TaskbarWindow.cpp +++ b/Applications/Taskbar/TaskbarWindow.cpp @@ -45,6 +45,11 @@ GButton* TaskbarWindow::create_button() return button; } +static bool should_include_window(GWindowType window_type) +{ + return window_type == GWindowType::Normal; +} + void TaskbarWindow::wm_event(GWMEvent& event) { WindowIdentifier identifier { event.client_id(), event.window_id() }; @@ -58,6 +63,8 @@ void TaskbarWindow::wm_event(GWMEvent& event) added_event.rect().to_string().characters(), added_event.is_active() ); + if (!should_include_window(added_event.window_type())) + break; auto& window = m_window_list.ensure_window(identifier); window.set_title(added_event.title()); window.set_rect(added_event.rect()); @@ -86,6 +93,8 @@ void TaskbarWindow::wm_event(GWMEvent& event) changed_event.rect().to_string().characters(), changed_event.is_active() ); + if (!should_include_window(changed_event.window_type())) + break; auto& window = m_window_list.ensure_window(identifier); window.set_title(changed_event.title()); window.set_rect(changed_event.rect()); |