diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-04-04 01:44:35 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-04-04 01:44:35 +0200 |
commit | 96104b55249ad0201b1be805e1874c759fdd0ac9 (patch) | |
tree | e56bc509d217f8e618a729b835ebd92b8bb6c16c /Servers/WindowServer/WSWindowManager.h | |
parent | ea801a99dcd2f00e048f107e89d29fd07d7f018b (diff) | |
download | serenity-96104b55249ad0201b1be805e1874c759fdd0ac9.zip |
Taskbar: More bringup work. We now see a basic window list.
Diffstat (limited to 'Servers/WindowServer/WSWindowManager.h')
-rw-r--r-- | Servers/WindowServer/WSWindowManager.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Servers/WindowServer/WSWindowManager.h b/Servers/WindowServer/WSWindowManager.h index 328f2d7f6e..8cc58c7b09 100644 --- a/Servers/WindowServer/WSWindowManager.h +++ b/Servers/WindowServer/WSWindowManager.h @@ -112,6 +112,7 @@ private: template<typename Callback> IterationDecision for_each_visible_window_of_type_from_front_to_back(WSWindowType, Callback); template<typename Callback> IterationDecision for_each_visible_window_from_front_to_back(Callback); template<typename Callback> IterationDecision for_each_visible_window_from_back_to_front(Callback); + template<typename Callback> void for_each_window_listening_to_wm_events(Callback); template<typename Callback> void for_each_active_menubar_menu(Callback); void close_current_menu(); virtual void on_message(const WSMessage&) override; @@ -265,3 +266,14 @@ IterationDecision WSWindowManager::for_each_visible_window_from_front_to_back(Ca return IterationDecision::Abort; return for_each_visible_window_of_type_from_front_to_back(WSWindowType::WindowSwitcher, callback); } + +template<typename Callback> +void WSWindowManager::for_each_window_listening_to_wm_events(Callback callback) +{ + for (auto* window = m_windows_in_order.tail(); window; window = window->prev()) { + if (!window->listens_to_wm_events()) + continue; + if (callback(*window) == IterationDecision::Abort) + return; + } +} |