diff options
author | Jason Rumney <[email protected]> | 2006-04-26 18:19:13 +0000 |
---|---|---|
committer | Jason Rumney <[email protected]> | 2006-04-26 18:19:13 +0000 |
commit | 8b03732ee066a88a13db238aa84385c32c78e8b2 (patch) | |
tree | dbfc08e2ffed36b5799547affe142dbf7fe70ce7 /src/w32term.c | |
parent | f5f69b6b4786851f34a0facccbfe911482706814 (diff) |
(construct_mouse_wheel): Handle negative coordinates.
Diffstat (limited to 'src/w32term.c')
-rw-r--r-- | src/w32term.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/w32term.c b/src/w32term.c index f0ef42f798..2b5c9da39b 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -3131,8 +3131,10 @@ construct_mouse_wheel (result, msg, f) result->modifiers = (msg->dwModifiers | ((delta < 0 ) ? down_modifier : up_modifier)); - p.x = LOWORD (msg->msg.lParam); - p.y = HIWORD (msg->msg.lParam); + /* With multiple monitors, we can legitimately get negative + coordinates, so cast to short to interpret them correctly. */ + p.x = (short) LOWORD (msg->msg.lParam); + p.y = (short) HIWORD (msg->msg.lParam); ScreenToClient (msg->msg.hwnd, &p); XSETINT (result->x, p.x); XSETINT (result->y, p.y); |