diff --git a/src/win32_window.c b/src/win32_window.c index 52423fe0..e6a6e13d 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -930,24 +930,24 @@ static int createWindow(_GLFWwindow* window, free(wideTitle); - if (_glfw_ChangeWindowMessageFilterEx) - { - _glfw_ChangeWindowMessageFilterEx(window->win32.handle, - WM_DROPFILES, MSGFLT_ALLOW, NULL); - _glfw_ChangeWindowMessageFilterEx(window->win32.handle, - WM_COPYDATA, MSGFLT_ALLOW, NULL); - _glfw_ChangeWindowMessageFilterEx(window->win32.handle, - WM_COPYGLOBALDATA, MSGFLT_ALLOW, NULL); - } - - DragAcceptFiles(window->win32.handle, TRUE); - if (!window->win32.handle) { _glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to create window"); return GL_FALSE; } + if (_glfw_ChangeWindowMessageFilterEx) + { + _glfw_ChangeWindowMessageFilterEx(window->win32.handle, + WM_DROPFILES, MSGFLT_ALLOW, NULL); + _glfw_ChangeWindowMessageFilterEx(window->win32.handle, + WM_COPYDATA, MSGFLT_ALLOW, NULL); + _glfw_ChangeWindowMessageFilterEx(window->win32.handle, + WM_COPYGLOBALDATA, MSGFLT_ALLOW, NULL); + } + + DragAcceptFiles(window->win32.handle, TRUE); + if (!_glfwCreateContext(window, ctxconfig, fbconfig)) return GL_FALSE;