I'm not sure exactly what is happening, but I suspect is needs something like the following in some other method. (from lp:qtmir src/platforms/mirserver/windowmanagementpolicy.cpp):
void WindowManagementPolicy::resize(const miral::Window &window, const Size size)
{
miral::WindowSpecification modifications;
modifications.size() = size;
m_tools.invoke_under_lock([&window, &modifications, this]() {
try { m_tools.modify_window(m_tools.info_for(window), modifications);
} catch (const std::out_of_range&) {
// usually shell trying to operate on a window which already closed, just ignore
// TODO: MirSurface extends the miral::Window lifetime by holding a shared pointer to
// the mir::scene::Surface, meaning it cannot detect when the window has been closed
// and thus avoid calling this method.
}
});
}
I'm not sure exactly what is happening, but I suspect is needs something like the following in some other method. (from lp:qtmir src/platforms/ mirserver/ windowmanagemen tpolicy. cpp):
void WindowManagemen tPolicy: :resize( const miral::Window &window, const Size size) :WindowSpecific ation modifications; ns.size( ) = size; invoke_ under_lock( [&window, &modifications, this]() {
m_ tools.modify_ window( m_tools. info_for( window) , modifications); :Surface, meaning it cannot detect when the window has been closed
{
miral:
modificatio
m_tools.
try {
} catch (const std::out_of_range&) {
// usually shell trying to operate on a window which already closed, just ignore
// TODO: MirSurface extends the miral::Window lifetime by holding a shared pointer to
// the mir::scene:
// and thus avoid calling this method.
}
});
}