summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2014-03-19 13:26:52 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-20 12:53:01 +0100
commita791943490599b4fca3589e9782830c034e9f343 (patch)
tree8085dc30150f5140e837f45345af1404f4b44fee /src/plugins/platforms
parent91d0ba8ff438920033050e74ced8b819b2c4b057 (diff)
Cocoa: Follow-up m_sendUpAsRightButton for DnD
Clear and test for the correct button according to the m_sendUpAsRightButton flag. (Fixes the warning mentioned QTBUG-35804) Task-number: QTBUG-35804 Change-Id: I5d724d1cfa66b88b8f54e228bd7fb73a04a9f4c9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 872ae5ebbb..47081ab890 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -652,7 +652,7 @@ static QTouchDevice *touchDevice = 0;
{
if (m_window->flags() & Qt::WindowTransparentForInput)
return [super mouseDragged:theEvent];
- if (!(m_buttons & Qt::LeftButton))
+ if (!(m_buttons & (m_sendUpAsRightButton ? Qt::RightButton : Qt::LeftButton)))
qWarning("QNSView mouseDragged: Internal mouse button tracking invalid (missing Qt::LeftButton)");
[self handleMouseEvent:theEvent];
}
@@ -1721,7 +1721,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
// keep our state, and QGuiApplication state (buttons member) in-sync,
// or future mouse events will be processed incorrectly
- m_buttons &= ~Qt::LeftButton;
+ m_buttons &= ~(m_sendUpAsRightButton ? Qt::RightButton : Qt::LeftButton);
NSPoint windowPoint = [self convertPoint: point fromView: nil];
QPoint qtWindowPoint(windowPoint.x, windowPoint.y);