desktop: use for_each_view() in desktop_topmost_focusable_view()

Fixes a regression in 83b619c2 that the bottom-most view is focused
when when an exclusive layer surface (e.g. fuzzel) is unfocused.

Also, added some comments to clarify the order.
This commit is contained in:
tokyo4j 2026-01-31 23:55:41 +09:00 committed by Consolatis
parent 67e3b36e58
commit 55a256f2fa
3 changed files with 4 additions and 3 deletions

View file

@ -138,7 +138,7 @@ static struct view *
desktop_topmost_focusable_view(struct server *server)
{
struct view *view;
for_each_view_reverse(view, &server->views,
for_each_view(view, &server->views,
LAB_VIEW_CRITERIA_CURRENT_WORKSPACE) {
if (!view->minimized) {
return view;