diff --git a/README.md b/README.md index f126d1e2..8579ef3e 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,8 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/). ## Changelog + - [Win32] Bugfix: The disabled cursor mode clip rectangle was updated for + unfocused windows - [Cocoa] Bugfix: The `GLFW_KEY_GRAVE_ACCENT` and `GLFW_KEY_WORLD_1` keys had been flipped - [Cocoa] Bugfix: The `GLFW_KEY_F13` key was reported as @@ -307,6 +309,7 @@ skills. - TTK-Bandit - Sergey Tikhomirov - Samuli Tuomola + - urraka - Jari Vetoniemi - Simon Voordouw - Torsten Walluhn diff --git a/src/win32_window.c b/src/win32_window.c index 139e661d..2b44ab16 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -654,8 +654,11 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, case WM_SIZE: { - if (window->cursorMode == GLFW_CURSOR_DISABLED) + if (window->cursorMode == GLFW_CURSOR_DISABLED && + _glfw.focusedWindow == window) + { updateClipRect(window); + } _glfwInputFramebufferSize(window, LOWORD(lParam), HIWORD(lParam)); _glfwInputWindowSize(window, LOWORD(lParam), HIWORD(lParam)); @@ -664,8 +667,11 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, case WM_MOVE: { - if (window->cursorMode == GLFW_CURSOR_DISABLED) + if (window->cursorMode == GLFW_CURSOR_DISABLED && + _glfw.focusedWindow == window) + { updateClipRect(window); + } _glfwInputWindowPos(window, LOWORD(lParam), HIWORD(lParam)); return 0;