From dd234764ab7cbbd90bf98b361e335088763f7bfa Mon Sep 17 00:00:00 2001 From: marc_culler Date: Fri, 30 Oct 2020 23:04:40 +0000 Subject: Fix compilation error created by following instructions for fixing Big Sur deprecation warning. --- macosx/tkMacOSXSysTray.c | 8 ++++++-- 1 file 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 -- cgit v0.12