# HG changeset patch # User Jordan Miner # Date 1250073890 18000 # Node ID d5928da5a1f0c9fb696a20af85d08c1743a02a4e # Parent 7adc733aca2d34f262c9a78315a435038c0d54ef Change from using GetCursorPos() to GetMessagePos() in a couple places. diff -r 7adc733aca2d -r d5928da5a1f0 dynamin/c/windows.d --- a/dynamin/c/windows.d Wed Aug 12 05:16:30 2009 -0500 +++ b/dynamin/c/windows.d Wed Aug 12 05:44:50 2009 -0500 @@ -833,6 +833,8 @@ HCURSOR SetCursor(HCURSOR hCursor); BOOL GetCursorPos(POINT* lpPoint); + +DWORD GetMessagePos(); //}}} //{{{ keyboard functions diff -r 7adc733aca2d -r d5928da5a1f0 dynamin/gui/windows_window.d --- a/dynamin/gui/windows_window.d Wed Aug 12 05:16:30 2009 -0500 +++ b/dynamin/gui/windows_window.d Wed Aug 12 05:44:50 2009 -0500 @@ -573,12 +573,13 @@ switch(uMsg) { case WM_ENTERSIZEMOVE: //when the user starts moving or resizing the window //{{{ - POINT cursor; - GetCursorPos(&cursor); + DWORD cur = GetMessagePos(); + short curX = cur & 0xFFFF; + short curY = cur >> 16; RECT rect; GetWindowRect(hwnd, &rect); - dragX = cursor.x-rect.left; - dragY = cursor.y-rect.top; + dragX = curX-rect.left; + dragY = curY-rect.top; return 0; //}}} case WM_MOVING: @@ -588,10 +589,11 @@ RECT* rect = cast(RECT*)lParam; int rectWidth = rect.right-rect.left; int rectHeight = rect.bottom-rect.top; - POINT cursor; - GetCursorPos(&cursor); - rect.left = cursor.x-dragX; - rect.top = cursor.y-dragY; + DWORD cur = GetMessagePos(); + short curX = cur & 0xFFFF; + short curY = cur >> 16; + rect.left = curX-dragX; + rect.top = curY-dragY; void updateRightAndBottom() { rect.right = rect.left+rectWidth; rect.bottom = rect.top+rectHeight;