From a38ecb4c67432b55c3040f0bcc79fa3f8d875690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 21 Oct 2014 14:51:29 +0200 Subject: Cocoa: Don't send FrameStrut events during drags Check the (normal) button state and return early if there is a pressed button. Task-number: QTBUG-41609 Change-Id: I69d23f02e55627ca3e03f2466103e0952ff442b3 Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qnsview.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 9b6a3f9ef4..aa57fc211e 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -721,6 +721,10 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil; - (void)handleFrameStrutMouseEvent:(NSEvent *)theEvent { // get m_buttons in sync + // Don't send frme strut events if we are in the middle of a mouse drag. + if (m_buttons != Qt::NoButton) + return; + NSEventType ty = [theEvent type]; switch (ty) { case NSLeftMouseDown: -- cgit v1.2.3