summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2014-10-23 11:48:45 +0200
committerMorten Johan Sørvig <morten.sorvig@digia.com>2014-10-24 08:45:13 +0200
commit0f644f48530f4693f7c77fd41ca42085b3218e81 (patch)
tree0d7fbdc3675f6649c5c578041666a9d4217a0f02
parentf08e6511bb9555e864f715550d4a838bc46fa33c (diff)
Cocoa: Prevent FrameStrutMouseEvent double-clicks
A window may see drag events without corresponding press/release events when dragging happens across several native windows. Handle NSLeftMouseDraged and NRightMouseDraged to synchronize mouse button state. Task-number: QTBUG-41609 Change-Id: Ieb66eb3460fc3cfd21e64c83ec1a28fe409af595 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index aa57fc211e..ca98f6cec3 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -736,6 +736,12 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
case NSRightMouseDown:
m_frameStrutButtons |= Qt::RightButton;
break;
+ case NSLeftMouseDragged:
+ m_frameStrutButtons |= Qt::LeftButton;
+ break;
+ case NSRightMouseDragged:
+ m_frameStrutButtons |= Qt::RightButton;
+ break;
case NSRightMouseUp:
m_frameStrutButtons &= ~Qt::RightButton;
break;