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>
This commit is contained in:
Morten Johan Sørvig 2014-10-23 11:48:45 +02:00
parent f08e6511bb
commit 0f644f4853

View File

@ -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;