diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-02-17 13:21:14 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-02-17 13:25:56 (GMT) |
commit | 39534745d6c274c2588fd7ce396da2f38415bd86 (patch) | |
tree | 74b2946979035dbecf350f1dcddb89c847ea2443 /src/gui/kernel/qt_cocoa_helpers_mac.mm | |
parent | df09fee0363eda36d827de02a4c7e899a536ed06 (diff) | |
download | Qt-39534745d6c274c2588fd7ce396da2f38415bd86.zip Qt-39534745d6c274c2588fd7ce396da2f38415bd86.tar.gz Qt-39534745d6c274c2588fd7ce396da2f38415bd86.tar.bz2 |
Mac: QSystemTrayIcon::DoubleClick and midmouse not working
On Mac, we never emit the activation signal of the tray icon with
other reasons than triggered. The reason; it was never implemented.
This patch connect the dots.
Task-number: QTBUG-5770
Diffstat (limited to 'src/gui/kernel/qt_cocoa_helpers_mac.mm')
-rw-r--r-- | src/gui/kernel/qt_cocoa_helpers_mac.mm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index f2ec4af..7f0ae57 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -648,6 +648,21 @@ bool qt_dispatchKeyEventWithCocoa(void * /*NSEvent * */ keyEvent, QWidget *widge } #endif +Qt::MouseButton cocoaButton2QtButton(long buttonNum) +{ + if (buttonNum == 0) + return Qt::LeftButton; + if (buttonNum == 1) + return Qt::RightButton; + if (buttonNum == 2) + return Qt::MidButton; + if (buttonNum == 3) + return Qt::XButton1; + if (buttonNum == 4) + return Qt::XButton2; + return Qt::NoButton; +} + // Helper to share code between QCocoaWindow and QCocoaView bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEvent) { |