mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpigui] Fix loading a maximized window on second monitor (#5721)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user