diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2018-02-01 10:03:53 +0100 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2018-02-12 07:39:58 +0000 |
commit | c168838f7d38b3639c8e7453b9ba697c2b0c5229 (patch) | |
tree | 048a7657b061d32b271fdd9b048d8bf16829c650 /src/plugins/platforms | |
parent | c4f0908f78619889dc69f969b578493edc0017d6 (diff) |
winrt: Correctly check if mouse button was clicked
The idea behind this code was to check, whether no
button was pressed. !isPressed only checks, whether
XButton2 was pressed though.
Change-Id: I358816fa62d230abf82116f0da7bc3a5e43fbaf6
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtscreen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp index e5b412a875..e37aeb0bc5 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.cpp +++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp @@ -1209,7 +1209,7 @@ HRESULT QWinRTScreen::onPointerUpdated(ICoreWindow *, IPointerEventArgs *args) // menus. if (buttons != Qt::NoButton && d->currentPressWindow == nullptr && !d->mouseGrabWindow) d->currentPressWindow = windowUnderPointer; - if (!isPressed && d->currentPressWindow && d->mouseGrabWindow) { + if (buttons == Qt::NoButton && d->currentPressWindow && d->mouseGrabWindow) { const QPointF globalPosDelta = pos - posPoint; const QPointF localPressPos = d->currentPressWindow->mapFromGlobal(posPoint) + globalPosDelta; |