diff --git a/src/win32_window.c b/src/win32_window.c index ad1129d2..94c87e08 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -1389,7 +1389,6 @@ static int createNativeWindow(_GLFWwindow* window, if (!wideTitle) return GLFW_FALSE; - window->win32.handleParent = wndconfig->win32.handleParent; window->win32.handle = CreateWindowExW(exStyle, MAKEINTATOM(_glfw.win32.mainWindowClass), wideTitle, @@ -1502,6 +1501,8 @@ GLFWbool _glfwCreateWindowWin32(_GLFWwindow* window, const _GLFWctxconfig* ctxconfig, const _GLFWfbconfig* fbconfig) { + window->win32.handleParent = wndconfig->win32.handleParent; + if (!createNativeWindow(window, wndconfig, fbconfig)) return GLFW_FALSE;