(construct_mouse_wheel): Handle negative coordinates.

This commit is contained in:
Jason Rumney 2006-04-26 18:19:13 +00:00
parent f5f69b6b47
commit 8b03732ee0
2 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,7 @@
2006-04-26 Jason Rumney <jasonr@gnu.org>
* w32term.c (construct_mouse_wheel): Handle negative coordinates.
* w32fns.c (w32_wnd_proc) <WM_LBUTTONDOWN, WM_RBUTTONDOWN>:
<WM_LBUTTONUP, WM_RBUTTONUP>: Call signal_user_input in the cases
where we preempt mouse_button_timer.

View file

@ -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);