summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2019-10-21 10:23:27 +0200
committerAndy Shaw <andy.shaw@qt.io>2019-11-03 11:44:08 +0100
commit39ed657b6393c850735857e367303800f1a04413 (patch)
tree184e06677bca400d8f7fa15499d240e2c1f893f9 /src
parent0fb995492d377fde96b453680f3604f5991171c0 (diff)
Query the mouse buttons initially in case the middle button was used
Change-Id: I99a3ef598bdaaba1afb6bf6521d1ceafcc9b603c Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/windows/qwindowspointerhandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.cpp b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
index 71a09304c5..fae01c9147 100644
--- a/src/plugins/platforms/windows/qwindowspointerhandler.cpp
+++ b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
@@ -579,7 +579,9 @@ bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
const QTabletEvent::TabletDevice device = QTabletEvent::Stylus;
QTabletEvent::PointerType type;
- Qt::MouseButtons mouseButtons;
+ // Since it may be the middle button, so if the checks fail then it should
+ // be set to Middle if it was used.
+ Qt::MouseButtons mouseButtons = queryMouseButtons();
const bool pointerInContact = IS_POINTER_INCONTACT_WPARAM(msg.wParam);
if (pointerInContact)