From 0ff22e4a49cb8fd4235a5c5a5dd884386432bf21 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 12 Jul 2016 16:04:02 +0200 Subject: [PATCH] Win32: Fix GLFW_MAXIMIZED ignored by first window Fixes #780. --- README.md | 2 ++ src/win32_init.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 1a720d27..95897d2d 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,8 @@ does not find Doxygen, the documentation will not be generated. ## Changelog - Bugfix: The range checks for `glfwSetCursorPos` used the wrong minimum +- [Win32] Bugfix: The first shown window ignored the `GLFW_MAXIMIZED` hint + when the process was provided a `STARTUPINFO` ## Contact diff --git a/src/win32_init.c b/src/win32_init.c index 207f948f..681954cb 100644 --- a/src/win32_init.c +++ b/src/win32_init.c @@ -319,6 +319,10 @@ static HWND createHelperWindow(void) return NULL; } + // HACK: The first call to ShowWindow is ignored if the parent process + // passed along a STARTUPINFO, so clear that flag with a no-op call + ShowWindow(window, SW_HIDE); + // Register for HID device notifications { DEV_BROADCAST_DEVICEINTERFACE_W dbi;