aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Nevins <jacobn@chiark.greenend.org.uk>2004-12-17 22:00:20 +0000
committerJacob Nevins <jacobn@chiark.greenend.org.uk>2004-12-17 22:00:20 +0000
commitec3d23c9d99e5233d40080623c032dfe157d29ac (patch)
treea9e1c1f3649b5744f278220e928b78f09b5c063d
parent6f62e91d51c1da7b6eba19fa78f5ee07de48d69d (diff)
downloadpuzzles-ec3d23c9d99e5233d40080623c032dfe157d29ac.zip
puzzles-ec3d23c9d99e5233d40080623c032dfe157d29ac.tar.gz
puzzles-ec3d23c9d99e5233d40080623c032dfe157d29ac.tar.bz2
puzzles-ec3d23c9d99e5233d40080623c032dfe157d29ac.tar.xz
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]
-rw-r--r--windows.c12
1 files 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;