diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-01-17 16:09:56 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-01-17 16:09:56 (GMT) |
commit | 54b3ddc0707f08378f75168df5b35653997fe3cf (patch) | |
tree | 3b7c516d918c905f0dea31b97c50c57a6338310f /src/gui/kernel/qt_cocoa_helpers_mac.mm | |
parent | 1e179f6c0279adefc20924731b6e8378a89131de (diff) | |
parent | d5716c0b27bcddfea0f1787aa59a08e340d64e30 (diff) | |
download | Qt-54b3ddc0707f08378f75168df5b35653997fe3cf.zip Qt-54b3ddc0707f08378f75168df5b35653997fe3cf.tar.gz Qt-54b3ddc0707f08378f75168df5b35653997fe3cf.tar.bz2 |
Merge branch 4.7 into qt-master-from-4.7
Diffstat (limited to 'src/gui/kernel/qt_cocoa_helpers_mac.mm')
-rw-r--r-- | src/gui/kernel/qt_cocoa_helpers_mac.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 3a0cafd..b2d9ca6 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1053,6 +1053,7 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev Qt::KeyboardModifiers keyMods = qt_cocoaModifiers2QtModifiers([theEvent modifierFlags]); NSInteger clickCount = [theEvent clickCount]; Qt::MouseButtons buttons = 0; + static Qt::MouseButton previousButton = Qt::NoButton; { UInt32 mac_buttons; if (GetEventParameter(carbonEvent, kEventParamMouseChord, typeUInt32, 0, @@ -1071,7 +1072,7 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev #ifndef QT_NAMESPACE Q_ASSERT(clickCount > 0); #endif - if (clickCount % 2 == 0 && buttons == button) + if (clickCount % 2 == 0 && (previousButton == Qt::NoButton || previousButton == button)) eventType = QEvent::MouseButtonDblClick; if (button == Qt::LeftButton && (keyMods & Qt::MetaModifier)) { button = Qt::RightButton; @@ -1105,6 +1106,7 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev QContextMenuEvent qcme(QContextMenuEvent::Mouse, qlocalPoint, qglobalPoint, keyMods); qt_sendSpontaneousEvent(widgetToGetMouse, &qcme); } + previousButton = button; return true; #endif } |