diff --git a/src/guiengine/abstract_state_manager.cpp b/src/guiengine/abstract_state_manager.cpp index 0bf88b5be..a491f1abd 100644 --- a/src/guiengine/abstract_state_manager.cpp +++ b/src/guiengine/abstract_state_manager.cpp @@ -331,6 +331,16 @@ void AbstractStateManager::onResize() return; } + const std::string& last_menu = m_menu_stack.back().first; + // For some window manager it sends resize event when STK is not focus + // even if the screen is not resizable, prevent it from resizing if wrong + // screen + // Hardcoded list of menu allowed to be resized for now + if (last_menu != "main_menu.stkgui" && + last_menu != "options_general.stkgui" && + last_menu != "options_video.stkgui") + return; + std::vector > screen_function; for (auto& p : m_menu_stack) screen_function.push_back(p.second->getNewScreenPointer());