diff options
| author | Jason Rumney | 2006-04-26 18:19:13 +0000 |
|---|---|---|
| committer | Jason Rumney | 2006-04-26 18:19:13 +0000 |
| commit | 8b03732ee066a88a13db238aa84385c32c78e8b2 (patch) | |
| tree | dbfc08e2ffed36b5799547affe142dbf7fe70ce7 /src | |
| parent | f5f69b6b4786851f34a0facccbfe911482706814 (diff) | |
| download | emacs-8b03732ee066a88a13db238aa84385c32c78e8b2.tar.gz emacs-8b03732ee066a88a13db238aa84385c32c78e8b2.zip | |
(construct_mouse_wheel): Handle negative coordinates.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/w32term.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c47d5970fad..45b99584427 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2006-04-26 Jason Rumney <jasonr@gnu.org> | 1 | 2006-04-26 Jason Rumney <jasonr@gnu.org> |
| 2 | 2 | ||
| 3 | * w32term.c (construct_mouse_wheel): Handle negative coordinates. | ||
| 4 | |||
| 3 | * w32fns.c (w32_wnd_proc) <WM_LBUTTONDOWN, WM_RBUTTONDOWN>: | 5 | * w32fns.c (w32_wnd_proc) <WM_LBUTTONDOWN, WM_RBUTTONDOWN>: |
| 4 | <WM_LBUTTONUP, WM_RBUTTONUP>: Call signal_user_input in the cases | 6 | <WM_LBUTTONUP, WM_RBUTTONUP>: Call signal_user_input in the cases |
| 5 | where we preempt mouse_button_timer. | 7 | where we preempt mouse_button_timer. |
diff --git a/src/w32term.c b/src/w32term.c index f0ef42f798b..2b5c9da39b6 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -3131,8 +3131,10 @@ construct_mouse_wheel (result, msg, f) | |||
| 3131 | result->modifiers = (msg->dwModifiers | 3131 | result->modifiers = (msg->dwModifiers |
| 3132 | | ((delta < 0 ) ? down_modifier : up_modifier)); | 3132 | | ((delta < 0 ) ? down_modifier : up_modifier)); |
| 3133 | 3133 | ||
| 3134 | p.x = LOWORD (msg->msg.lParam); | 3134 | /* With multiple monitors, we can legitimately get negative |
| 3135 | p.y = HIWORD (msg->msg.lParam); | 3135 | coordinates, so cast to short to interpret them correctly. */ |
| 3136 | p.x = (short) LOWORD (msg->msg.lParam); | ||
| 3137 | p.y = (short) HIWORD (msg->msg.lParam); | ||
| 3136 | ScreenToClient (msg->msg.hwnd, &p); | 3138 | ScreenToClient (msg->msg.hwnd, &p); |
| 3137 | XSETINT (result->x, p.x); | 3139 | XSETINT (result->x, p.x); |
| 3138 | XSETINT (result->y, p.y); | 3140 | XSETINT (result->y, p.y); |