Cocoa: Send keyboard modifiers with mouse events.
authorMorten Johan Sorvig <morten.sorvig@nokia.com>
Wed, 10 Oct 2012 07:02:51 +0000 (09:02 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 10 Oct 2012 08:44:12 +0000 (10:44 +0200)
Task-number: QTBUG-27462

Change-Id: Icb9352fcae6f92885d4f1381aa8014fef039149b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
src/plugins/platforms/cocoa/qnsview.mm

index a95ff45..fe1b26a 100644 (file)
@@ -315,7 +315,8 @@ static QTouchDevice *touchDevice = 0;
     QCocoaDrag* nativeDrag = static_cast<QCocoaDrag *>(QGuiApplicationPrivate::platformIntegration()->drag());
     nativeDrag->setLastMouseEvent(theEvent, self);
 
-    QWindowSystemInterface::handleMouseEvent(m_window, timestamp, qtWindowPoint, qtScreenPoint, m_buttons);
+    Qt::KeyboardModifiers keyboardModifiers = [self convertKeyModifiers:[theEvent modifierFlags]];
+    QWindowSystemInterface::handleMouseEvent(m_window, timestamp, qtWindowPoint, qtScreenPoint, m_buttons, keyboardModifiers);
 }
 
 - (void)handleFrameStrutMouseEvent:(NSEvent *)theEvent