Ken Thomases : winemac: Don' t generate scroll wheel events for axes with 0 delta.
Alexandre Julliard
julliard at winehq.org
Tue Aug 27 14:47:55 CDT 2013
Module: wine
Branch: master
Commit: 1b9fac3b3dfbb63157dbfeeb5d90c34f4f7d81bd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1b9fac3b3dfbb63157dbfeeb5d90c34f4f7d81bd
Author: Ken Thomases <ken at codeweavers.com>
Date: Mon Aug 26 20:14:00 2013 -0500
winemac: Don't generate scroll wheel events for axes with 0 delta.
---
dlls/winemac.drv/mouse.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/winemac.drv/mouse.c b/dlls/winemac.drv/mouse.c
index b729d55..f9130c0 100644
--- a/dlls/winemac.drv/mouse.c
+++ b/dlls/winemac.drv/mouse.c
@@ -911,12 +911,14 @@ void macdrv_mouse_scroll(HWND hwnd, const macdrv_event *event)
event->mouse_scroll.x, event->mouse_scroll.y,
event->mouse_scroll.time_ms, (GetTickCount() - event->mouse_scroll.time_ms));
- send_mouse_input(hwnd, event->window, MOUSEEVENTF_WHEEL | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE,
- event->mouse_scroll.x, event->mouse_scroll.y,
- event->mouse_scroll.y_scroll, FALSE, event->mouse_scroll.time_ms);
- send_mouse_input(hwnd, event->window, MOUSEEVENTF_HWHEEL | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE,
- event->mouse_scroll.x, event->mouse_scroll.y,
- event->mouse_scroll.x_scroll, FALSE, event->mouse_scroll.time_ms);
+ if (event->mouse_scroll.y_scroll)
+ send_mouse_input(hwnd, event->window, MOUSEEVENTF_WHEEL | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE,
+ event->mouse_scroll.x, event->mouse_scroll.y,
+ event->mouse_scroll.y_scroll, FALSE, event->mouse_scroll.time_ms);
+ if (event->mouse_scroll.x_scroll)
+ send_mouse_input(hwnd, event->window, MOUSEEVENTF_HWHEEL | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE,
+ event->mouse_scroll.x, event->mouse_scroll.y,
+ event->mouse_scroll.x_scroll, FALSE, event->mouse_scroll.time_ms);
}
More information about the wine-cvs
mailing list