src/osd.c: Prevent showing invalid windows

This might happen when closing the last
application "to tray" like VLC, Discord or Steam.

Reported-by: @Flrian
This commit is contained in:
Consolatis 2022-09-26 03:48:02 +02:00 committed by Johan Malm
parent f2277c37c3
commit c83c1beace
2 changed files with 5 additions and 2 deletions

View file

@ -179,7 +179,10 @@ first_view(struct server *server)
struct wl_list *list_head =
&server->workspace_current->tree->children;
wl_list_for_each_reverse(node, list_head, link) {
return node_view_from_node(node);
struct view *view = node_view_from_node(node);
if (isfocusable(view)) {
return view;
}
}
return NULL;
}