From a791943490599b4fca3589e9782830c034e9f343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 19 Mar 2014 13:26:52 +0100 Subject: 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 --- src/plugins/platforms/cocoa/qnsview.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3