# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1599782313 0 # Node ID be4547734f0b45e25fcd62c19309f4a917a91e6b # Parent c08e03168a9ee86b44a7648b35ba809d9f254208 Mac: Remove the old notification center when building for Big Sur 11.0. This means apps built for Big Sur will not generate notifications when run on macOS prior to Mojave (10.14). If you need this support build for Mojave or Catalina (10.15). diff -r c08e03168a9e -r be4547734f0b mac/dw.m --- a/mac/dw.m Thu Sep 10 20:18:43 2020 +0000 +++ b/mac/dw.m Thu Sep 10 23:58:33 2020 +0000 @@ -1362,7 +1362,7 @@ { } -(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender; -#ifdef BUILDING_FOR_MOUNTAIN_LION +#if defined(BUILDING_FOR_MOUNTAIN_LION) && !defined(BUILDING_FOR_BIG_SUR) -(void)applicationDidFinishLaunching:(NSNotification *)aNotification; -(BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification; -(void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification; @@ -1453,7 +1453,7 @@ return NSTerminateCancel; return NSTerminateNow; } -#ifdef BUILDING_FOR_MOUNTAIN_LION +#if defined(BUILDING_FOR_MOUNTAIN_LION) && !defined(BUILDING_FOR_BIG_SUR) -(void)applicationDidFinishLaunching:(NSNotification *)aNotification { #ifdef BUILDING_FOR_MOJAVE @@ -10879,6 +10879,7 @@ else #endif { +#ifndef BUILDING_FOR_BIG_SUR // Fallback on earlier versions NSUserNotification *notification = [[NSUserNotification alloc] init]; @@ -10890,6 +10891,7 @@ notification.contentImage = [[NSImage alloc] initWithContentsOfFile:[NSString stringWithUTF8String:imagepath]]; retval = notification; } +#endif } return retval; #else @@ -10927,10 +10929,12 @@ else #endif { +#ifndef BUILDING_FOR_BIG_SUR // Fallback on earlier versions NSUserNotification *request = (NSUserNotification *)notification; request.identifier = notid; [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:request]; +#endif } return DW_ERROR_NONE; }