Mercurial > emacs
diff src/w32term.c @ 70234:4282b2a1849b
(construct_mouse_wheel): Handle negative coordinates.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Wed, 26 Apr 2006 18:18:08 +0000 |
parents | 646410df27a7 |
children | a86a3503e350 966a40e7fb54 2ecafc6d5db7 |
line wrap: on
line diff
--- a/src/w32term.c Wed Apr 26 17:54:41 2006 +0000 +++ b/src/w32term.c Wed Apr 26 18:18:08 2006 +0000 @@ -3131,8 +3131,10 @@ 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);