From c168838f7d38b3639c8e7453b9ba697c2b0c5229 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Thu, 1 Feb 2018 10:03:53 +0100 Subject: 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 Reviewed-by: Maurice Kalinowski --- src/plugins/platforms/winrt/qwinrtscreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/winrt') 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; -- cgit v1.2.3