mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
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. [originally from svn r5007]
This commit is contained in:
12
windows.c
12
windows.c
@ -1017,8 +1017,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
|||||||
else
|
else
|
||||||
button = RIGHT_BUTTON;
|
button = RIGHT_BUTTON;
|
||||||
|
|
||||||
if (!midend_process_key(fe->me, LOWORD(lParam),
|
if (!midend_process_key(fe->me, (signed short)LOWORD(lParam),
|
||||||
HIWORD(lParam), button))
|
(signed short)HIWORD(lParam), button))
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
|
|
||||||
SetCapture(hwnd);
|
SetCapture(hwnd);
|
||||||
@ -1042,8 +1042,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
|||||||
else
|
else
|
||||||
button = RIGHT_RELEASE;
|
button = RIGHT_RELEASE;
|
||||||
|
|
||||||
if (!midend_process_key(fe->me, LOWORD(lParam),
|
if (!midend_process_key(fe->me, (signed short)LOWORD(lParam),
|
||||||
HIWORD(lParam), button))
|
(signed short)HIWORD(lParam), button))
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
|
|
||||||
ReleaseCapture();
|
ReleaseCapture();
|
||||||
@ -1060,8 +1060,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
|||||||
else
|
else
|
||||||
button = RIGHT_DRAG;
|
button = RIGHT_DRAG;
|
||||||
|
|
||||||
if (!midend_process_key(fe->me, LOWORD(lParam),
|
if (!midend_process_key(fe->me, (signed short)LOWORD(lParam),
|
||||||
HIWORD(lParam), button))
|
(signed short)HIWORD(lParam), button))
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user