We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13f10ce commit 928059bCopy full SHA for 928059b
1 file changed
src/miral/window_info.cpp
@@ -304,7 +304,9 @@ auto miral::WindowInfo::restore_rect() const -> mir::geometry::Rectangle
304
305
// Halfway between current size and min size is reasonable for a maximized/fullscreen window
306
std::shared_ptr<mir::scene::Surface> const surface{self->window};
307
- auto const min_size_disp = Displacement{as_delta(surface->min_width()), as_delta(surface->min_height())};
+ auto const min_size_disp = surface ?
308
+ Displacement{as_delta(surface->min_width()), as_delta(surface->min_height())} :
309
+ Displacement{};
310
Size const reasonable_size{as_size(
311
(as_displacement(self->window.size()) - min_size_disp) * 0.5
312
+ min_size_disp)};
0 commit comments