summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXSysTray.c
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2020-10-30 23:04:40 (GMT)
committermarc_culler <marc.culler@gmail.com>2020-10-30 23:04:40 (GMT)
commitdd234764ab7cbbd90bf98b361e335088763f7bfa (patch)
tree21972ee7beb0c613a2d48698faf6d04bc192e31e /macosx/tkMacOSXSysTray.c
parent75341c0c26392cd34a2d1f4a06118a1ab6b5a51d (diff)
downloadtk-dd234764ab7cbbd90bf98b361e335088763f7bfa.zip
tk-dd234764ab7cbbd90bf98b361e335088763f7bfa.tar.gz
tk-dd234764ab7cbbd90bf98b361e335088763f7bfa.tar.bz2
Fix compilation error created by following instructions for fixing Big Sur deprecation warning.
Diffstat (limited to 'macosx/tkMacOSXSysTray.c')
-rw-r--r--macosx/tkMacOSXSysTray.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/macosx/tkMacOSXSysTray.c b/macosx/tkMacOSXSysTray.c
index f9582c7..9920001 100644
--- a/macosx/tkMacOSXSysTray.c
+++ b/macosx/tkMacOSXSysTray.c
@@ -355,8 +355,12 @@ typedef TkStatusItem** StatusItemInfo;
willPresentNotification:(UNNotification *)notification
withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
{
- completionHandler(UNNotificationPresentationOptionList |
- UNNotificationPresentationOptionBanner);
+ if (@available(macOS 11.0, *)) {
+ completionHandler(UNNotificationPresentationOptionList |
+ UNNotificationPresentationOptionBanner);
+ } else {
+ completionHandler(UNNotificationPresentationOptionAlert);
+ }
}
- (void) userNotificationCenter:(UNUserNotificationCenter *)center