Fix create as child window style

This commit is contained in:
halx99 2024-02-25 12:33:28 +08:00 committed by Deal
parent a94c9782d5
commit f1284eb884

View File

@ -1389,7 +1389,6 @@ static int createNativeWindow(_GLFWwindow* window,
if (!wideTitle) if (!wideTitle)
return GLFW_FALSE; return GLFW_FALSE;
window->win32.handleParent = wndconfig->win32.handleParent;
window->win32.handle = CreateWindowExW(exStyle, window->win32.handle = CreateWindowExW(exStyle,
MAKEINTATOM(_glfw.win32.mainWindowClass), MAKEINTATOM(_glfw.win32.mainWindowClass),
wideTitle, wideTitle,
@ -1502,6 +1501,8 @@ GLFWbool _glfwCreateWindowWin32(_GLFWwindow* window,
const _GLFWctxconfig* ctxconfig, const _GLFWctxconfig* ctxconfig,
const _GLFWfbconfig* fbconfig) const _GLFWfbconfig* fbconfig)
{ {
window->win32.handleParent = wndconfig->win32.handleParent;
if (!createNativeWindow(window, wndconfig, fbconfig)) if (!createNativeWindow(window, wndconfig, fbconfig))
return GLFW_FALSE; return GLFW_FALSE;