diff --git a/src/Magnum/Platform/GlfwApplication.cpp b/src/Magnum/Platform/GlfwApplication.cpp index 7b851e785..ef46be6c5 100644 --- a/src/Magnum/Platform/GlfwApplication.cpp +++ b/src/Magnum/Platform/GlfwApplication.cpp @@ -87,7 +87,6 @@ bool GlfwApplication::tryCreateContext(const Configuration& configuration) { #ifdef GLFW_MAXIMIZED glfwWindowHint(GLFW_MAXIMIZED, flags >= Configuration::WindowFlag::Maximized); #endif - glfwWindowHint(GLFW_ICONIFIED, flags >= Configuration::WindowFlag::Minimized); glfwWindowHint(GLFW_FLOATING, flags >= Configuration::WindowFlag::Floating); } glfwWindowHint(GLFW_FOCUSED, configuration.windowFlags() >= Configuration::WindowFlag::Focused); @@ -103,9 +102,6 @@ bool GlfwApplication::tryCreateContext(const Configuration& configuration) { glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, flags >= Configuration::Flag::Debug); glfwWindowHint(GLFW_STEREO, flags >= Configuration::Flag::Stereo); - /* Cursor flags */ - glfwWindowHint(GLFW_CURSOR, Int(configuration.cursorMode())); - /* Set context version, if requested */ if(configuration.version() != Version::None) { Int major, minor; @@ -130,6 +126,12 @@ bool GlfwApplication::tryCreateContext(const Configuration& configuration) { return false; } + /* Proceed with configuring other stuff that couldn't be done with window + hints */ + if(configuration.windowFlags() >= Configuration::WindowFlag::Minimized) + glfwIconifyWindow(_window); + glfwSetInputMode(_window, GLFW_CURSOR, Int(configuration.cursorMode())); + /* Set callbacks */ glfwSetFramebufferSizeCallback(_window, staticViewportEvent); glfwSetKeyCallback(_window, staticKeyEvent);