# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1589541907 0 # Node ID cf70a52f702e2e0c627b0f7266f262c9f82989a0 # Parent b7514ecd6305811ef91b72a8fb255400727056e0 Mac: Changes to actively display the notification on versions prior to Mojave 10.14. diff -r b7514ecd6305 -r cf70a52f702e mac/dw.m --- a/mac/dw.m Fri May 15 04:54:57 2020 +0000 +++ b/mac/dw.m Fri May 15 11:25:07 2020 +0000 @@ -1341,11 +1341,13 @@ /* Subclass for the application class */ @interface DWAppDel : NSObject #ifdef BUILDING_FOR_SNOW_LEOPARD - + #endif { } -(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender; +-(void)applicationDidFinishLaunching:(NSNotification *)aNotification; +-(BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification; @end /* Apparently the WKWebKit API is only enabled on intel 64bit... @@ -1432,6 +1434,20 @@ return NSTerminateCancel; return NSTerminateNow; } +-(void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ +#ifdef BUILDING_FOR_MOJAVE + if (!@available(macOS 10.14, *)) +#endif + { + NSUserNotificationCenter* unc = [NSUserNotificationCenter defaultUserNotificationCenter]; + unc.delegate = self; + } +} +-(BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification +{ + return YES; +} @end /* Subclass for a top-level window */