浏览代码

Win32: Re-enable cursor during modal loops

Related to #650.
Camilla Berglund 9 年之前
父节点
当前提交
ed076b7c5b
共有 1 个文件被更改,包括 18 次插入0 次删除
  1. 18 0
      src/win32_window.c

+ 18 - 0
src/win32_window.c

@@ -671,6 +671,24 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
             return 0;
             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:
         case WM_SIZE:
         {
         {
             const GLFWbool iconified =
             const GLFWbool iconified =