mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
Taskbar: More bringup work. We now see a basic window list.
This commit is contained in:
parent
ea801a99dc
commit
96104b5524
20 changed files with 339 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue