Fixed clip rect being set for unfocused windows.

This commit is contained in:
Camilla Berglund
2013-10-07 15:30:57 +02:00
parent 161065ac19
commit 9c5d9f8614
2 changed files with 11 additions and 2 deletions
+8 -2
View File
@@ -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;