src/view.c: ensure natural geometry is restored even with no outputs available

Reported-by: @Flrian
This commit is contained in:
Consolatis 2022-12-30 19:41:34 +01:00 committed by Johan Malm
parent 0d8b459912
commit c75508fcc5

View file

@ -358,8 +358,8 @@ static void
view_apply_natural_geometry(struct view *view)
{
struct wlr_output_layout *layout = view->server->output_layout;
if (wlr_output_layout_intersects(layout, NULL,
&view->natural_geometry)) {
if (wlr_output_layout_intersects(layout, NULL, &view->natural_geometry)
|| wl_list_empty(&layout->outputs)) {
/* restore to original geometry */
view_move_resize(view, view->natural_geometry);
} else {