summaryrefslogtreecommitdiff
path: root/Applications/Taskbar
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-04 16:23:23 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-04 16:23:23 +0200
commit64a5abf8db3694cc73b4d822f482f1fa4dde8647 (patch)
tree5677e8b2ababb39139645fec4e32dd1b33ad68c4 /Applications/Taskbar
parent82b02ed82beeac8f0173f3fb4d7d7286c437c381 (diff)
downloadserenity-64a5abf8db3694cc73b4d822f482f1fa4dde8647.zip
Taskbar: Only include "Normal" windows in the taskbar window list.
Diffstat (limited to 'Applications/Taskbar')
-rw-r--r--Applications/Taskbar/TaskbarWindow.cpp9
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());