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>
This commit is contained in:
parent
c4f0908f78
commit
c168838f7d
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user