From 19e653ef1bd81138c56739629abdcb0e4983af28 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 20 Nov 2021 04:42:01 +0530 Subject: [PATCH] Fix building on older macOS SDKs --- kitty/cocoa_window.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kitty/cocoa_window.m b/kitty/cocoa_window.m index c59552aaf..e046ca483 100644 --- a/kitty/cocoa_window.m +++ b/kitty/cocoa_window.m @@ -226,11 +226,8 @@ cocoa_send_notification(PyObject *self UNUSED, PyObject *args) { willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler { UNNotificationPresentationOptions options = UNNotificationPresentationOptionSound; -#if MAC_OS_X_VERSION_MAX_ALLOWED < 110000 - options |= UNNotificationPresentationOptionAlert; -#else - options |= UNNotificationPresentationOptionList | UNNotificationPresentationOptionBanner; -#endif + if(@available(macOS 11.0, *)) options |= UNNotificationPresentationOptionList | UNNotificationPresentationOptionBanner; + else options |= UNNotificationPresentationOptionAlert; completionHandler(options); }