mirror of
https://github.com/wizbright/waybox.git
synced 2026-03-11 05:34:15 -04:00
Fixed crash on Close action with no view open
This commit is contained in:
parent
141a941bed
commit
94e23a28f3
1 changed files with 4 additions and 1 deletions
|
|
@ -72,7 +72,8 @@ static bool handle_keybinding(struct wb_server *server, xkb_keysym_t sym, uint32
|
||||||
{
|
{
|
||||||
struct wb_view *current_view = wl_container_of(
|
struct wb_view *current_view = wl_container_of(
|
||||||
server->views.next, current_view, link);
|
server->views.next, current_view, link);
|
||||||
wlr_xdg_toplevel_send_close(current_view->xdg_toplevel);
|
if (wlr_surface_is_xdg_surface(current_view->xdg_toplevel->base->surface))
|
||||||
|
wlr_xdg_toplevel_send_close(current_view->xdg_toplevel);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case ACTION_EXECUTE:
|
case ACTION_EXECUTE:
|
||||||
|
|
@ -87,6 +88,8 @@ static bool handle_keybinding(struct wb_server *server, xkb_keysym_t sym, uint32
|
||||||
case ACTION_EXIT:
|
case ACTION_EXIT:
|
||||||
wl_display_terminate(server->wl_display);
|
wl_display_terminate(server->wl_display);
|
||||||
return true;
|
return true;
|
||||||
|
default:
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue