mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
WindowServer: Use range-for with InlineLinkedList
This commit is contained in:
parent
bb9909548b
commit
028e834bb4
1 changed files with 6 additions and 6 deletions
|
@ -254,18 +254,18 @@ template<typename Callback>
|
|||
IterationDecision WSWindowManager::for_each_visible_window_of_type_from_back_to_front(WSWindowType type, Callback callback, bool ignore_highlight)
|
||||
{
|
||||
bool do_highlight_window_at_end = false;
|
||||
for (auto* window = m_windows_in_order.head(); window; window = window->next()) {
|
||||
if (!window->is_visible())
|
||||
for (auto& window : m_windows_in_order) {
|
||||
if (!window.is_visible())
|
||||
continue;
|
||||
if (window->is_minimized())
|
||||
if (window.is_minimized())
|
||||
continue;
|
||||
if (window->type() != type)
|
||||
if (window.type() != type)
|
||||
continue;
|
||||
if (!ignore_highlight && m_highlight_window == window) {
|
||||
if (!ignore_highlight && m_highlight_window == &window) {
|
||||
do_highlight_window_at_end = true;
|
||||
continue;
|
||||
}
|
||||
if (callback(*window) == IterationDecision::Break)
|
||||
if (callback(window) == IterationDecision::Break)
|
||||
return IterationDecision::Break;
|
||||
}
|
||||
if (do_highlight_window_at_end) {
|
||||
|
|
Loading…
Add table
Reference in a new issue