From 5dda68e8cf413ef970e2aed330c01af2aeae856a Mon Sep 17 00:00:00 2001 From: jacob Date: Fri, 17 Dec 2004 22:00:20 +0000 Subject: [PATCH] Add grotty casts to prevent negative -> large positive conversion of cursor position in Windows frontend; this showed up as a UI glitch while dragging to the left/top of the window in Rectangles. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@5007 cda61777-01e9-0310-a592-d414129be87e --- windows.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/windows.c b/windows.c index 9fa6c95..494caae 100644 --- a/windows.c +++ b/windows.c @@ -1017,8 +1017,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, else button = RIGHT_BUTTON; - if (!midend_process_key(fe->me, LOWORD(lParam), - HIWORD(lParam), button)) + if (!midend_process_key(fe->me, (signed short)LOWORD(lParam), + (signed short)HIWORD(lParam), button)) PostQuitMessage(0); SetCapture(hwnd); @@ -1042,8 +1042,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, else button = RIGHT_RELEASE; - if (!midend_process_key(fe->me, LOWORD(lParam), - HIWORD(lParam), button)) + if (!midend_process_key(fe->me, (signed short)LOWORD(lParam), + (signed short)HIWORD(lParam), button)) PostQuitMessage(0); ReleaseCapture(); @@ -1060,8 +1060,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, else button = RIGHT_DRAG; - if (!midend_process_key(fe->me, LOWORD(lParam), - HIWORD(lParam), button)) + if (!midend_process_key(fe->me, (signed short)LOWORD(lParam), + (signed short)HIWORD(lParam), button)) PostQuitMessage(0); } break; -- 2.11.0