summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsmousehandler.cpp
diff options
context:
space:
mode:
authorGlenn Watson <glenn.watson@nokia.com>2012-06-22 10:36:36 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-22 11:47:24 +0200
commit4a8d9eed87565b20c1f10b173c652be26ea608f7 (patch)
treefc278efc4fa66a1b7f8233be549978fd36a98fc3 /src/plugins/platforms/windows/qwindowsmousehandler.cpp
parent6481218da13539529b87626a352a17f42c57be61 (diff)
Fix key modifiers in mouse wheel events on Windows.
The Windows platform plugin was not checking for the control or shift keyboard modifiers when processing mouse wheel events. Added a function to convert Windows wheel events to Qt::KeyboardModifiers and passed this through the event chain. Task-number: QTBUG-25754 Change-Id: I6551e98b4eaebad5704058bddfb06502ded5155d Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsmousehandler.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
index 48d43857e9..eb7d2912bb 100644
--- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp
+++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp
@@ -196,6 +196,8 @@ bool QWindowsMouseHandler::translateMouseWheelEvent(QWindow *window, HWND,
MSG msg, LRESULT *)
{
const Qt::MouseButtons buttons = keyStateToMouseButtons((int)msg.wParam);
+ const Qt::KeyboardModifiers mods = keyStateToModifiers((int)msg.wParam);
+
int delta;
if (msg.message == WM_MOUSEWHEEL || msg.message == WM_MOUSEHWHEEL)
delta = (short) HIWORD (msg.wParam);
@@ -224,7 +226,7 @@ bool QWindowsMouseHandler::translateMouseWheelEvent(QWindow *window, HWND,
QWindowSystemInterface::handleWheelEvent(receiver,
QWindowsGeometryHint::mapFromGlobal(receiver, globalPos),
globalPos,
- delta, orientation);
+ delta, orientation, mods);
return true;
}