summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2019-08-30 13:13:15 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2019-08-30 14:17:28 +0200
commitc66732b979a4e9fb34bda062747f84e099a4fcee (patch)
tree50e7bdac9fe5078e921f85c7b5f6f070826c3dcf /src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
parent43a1db6855217a67d771ad031feded112e1447c8 (diff)
QSystemTrayIcon: on macOS, hide messages when the user clicks them
This is default behavior on macOS, and also the behavior on Windows. [ChangeLog][QtWidgets][QSystemTrayIcon] On macOS, clicking on the message will remove the notification. Change-Id: Ie30f7dacf478af76ccb53d16aea8f122869072c8 Fixes: QTBUG-77150 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
index db64702b8d..b805fad0fe 100644
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
@@ -434,8 +434,7 @@ QT_END_NAMESPACE
}
- (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification {
- Q_UNUSED(center);
- Q_UNUSED(notification);
+ [center removeDeliveredNotification:notification];
emit systray->messageClicked();
}