mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
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:
parent
f2277c37c3
commit
c83c1beace
2 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ osd_update(struct server *server)
|
|||
struct wl_list *node_list =
|
||||
&server->workspace_current->tree->children;
|
||||
|
||||
if (wl_list_empty(node_list)) {
|
||||
if (wl_list_empty(node_list) || !server->osd_state.cycle_view) {
|
||||
osd_finish(server);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue