From ed076b7c5b42a2313ab992c56adfc8f194782db5 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 31 May 2016 12:57:55 +0200 Subject: [PATCH] Win32: Re-enable cursor during modal loops Related to #650. --- src/win32_window.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/win32_window.c b/src/win32_window.c index 95a258a2..5138debc 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -671,6 +671,24 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, return 0; } + case WM_ENTERSIZEMOVE: + case WM_ENTERMENULOOP: + { + if (window->cursorMode == GLFW_CURSOR_DISABLED) + _glfwPlatformSetCursorMode(window, GLFW_CURSOR_NORMAL); + + break; + } + + case WM_EXITSIZEMOVE: + case WM_EXITMENULOOP: + { + if (window->cursorMode == GLFW_CURSOR_DISABLED) + _glfwPlatformSetCursorMode(window, GLFW_CURSOR_DISABLED); + + break; + } + case WM_SIZE: { const GLFWbool iconified =