diff --git a/wpigui/src/main/native/cpp/wpigui.cpp b/wpigui/src/main/native/cpp/wpigui.cpp index 6fd39ae7e3f..e2e05ce0674 100644 --- a/wpigui/src/main/native/cpp/wpigui.cpp +++ b/wpigui/src/main/native/cpp/wpigui.cpp @@ -227,8 +227,6 @@ bool gui::Initialize(const char* title, int width, int height, } // Set initial window settings - glfwWindowHint(GLFW_MAXIMIZED, gContext->maximized ? GLFW_TRUE : GLFW_FALSE); - if (gContext->width == 0 || gContext->height == 0) { gContext->width = gContext->defaultWidth; gContext->height = gContext->defaultHeight; @@ -303,6 +301,10 @@ bool gui::Initialize(const char* title, int width, int height, glfwShowWindow(gContext->window); } + if (gContext->maximized) { + glfwMaximizeWindow(gContext->window); + } + // Set window callbacks glfwGetWindowSize(gContext->window, &gContext->width, &gContext->height); glfwSetWindowSizeCallback(gContext->window, WindowSizeCallback);