Commit 8b03732e authored by Jason Rumney's avatar Jason Rumney
Browse files

(construct_mouse_wheel): Handle negative coordinates.

parent f5f69b6b
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.
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment