From 109e3d13edfd2e0fdfdf1964a0f1362f44b4068a Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 13 Nov 2013 12:34:43 +0100 Subject: [PATCH] Fixed reporting of negative window positions. MSDN recommends LOWORD and HIWORD for WM_MOVE, but these do not handle negative window positions correctly. Fixes #172. --- README.md | 1 + src/win32_window.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f9fe3a01..2146db9e 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ guide in the GLFW documentation. - [Win32] Bugfix: The disabled cursor mode clip rectangle was updated for unfocused windows - [Win32] Bugfix: Cursor was not properly re-centered over odd-sized windows + - [Win32] Bugfix: Negative window positions were reported incorrectly - [Cocoa] Added dependency on CoreVideo framework for refresh rate retrieval - [Cocoa] Enabled Lion full screen for resizable windowed mode windows - [Cocoa] Moved to Cocoa API for application transformation and activation diff --git a/src/win32_window.c b/src/win32_window.c index d90bd332..30fc1668 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -684,7 +684,9 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, updateClipRect(window); } - _glfwInputWindowPos(window, LOWORD(lParam), HIWORD(lParam)); + _glfwInputWindowPos(window, + GET_X_LPARAM(lParam), + GET_Y_LPARAM(lParam)); return 0; }