Skip to content

Commit

Permalink
Account for selected == null in ApplicationSelector::advance
Browse files Browse the repository at this point in the history
  • Loading branch information
tarek-y-ismail committed Jan 9, 2025
1 parent ccd6e4e commit fa432b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/miral/application_selector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ auto ApplicationSelector::advance(bool reverse, bool within_app) -> Window
is_active_ = true;
}

// If nothing is selected, start from the begining of the list.
if(!selected)
selected = *focus_list.begin();

// Attempt to focus the next application after the selected application.
auto it = find(selected);

Expand Down

0 comments on commit fa432b4

Please sign in to comment.