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>
bb10
Andy Shaw 2019-10-21 10:23:27 +02:00
parent 0fb995492d
commit 39ed657b63
1 changed files with 3 additions and 1 deletions

View File

@ -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)