diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index fbbe6aebf..2331a9ff6 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1487,6 +1487,7 @@ static FLWindowDelegate *flwindowdelegate_instance = nil; open_cb_f_type open_cb; TSMDocumentID currentDoc; } +- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app; - (void)applicationDidFinishLaunching:(NSNotification *)notification; - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)sender; - (void)applicationDidBecomeActive:(NSNotification *)notify; @@ -1499,6 +1500,14 @@ static FLWindowDelegate *flwindowdelegate_instance = nil; @end @implementation FLAppDelegate +- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app { + // Avoids macOS 14 warning message when app is launched from command line: + // "WARNING: Secure coding is automatically enabled for restorable state! + // However, not on all supported macOS versions of this application. + // Opt-in to secure coding explicitly by implementing + // NSApplicationDelegate.applicationSupportsSecureRestorableState:." + return (fl_mac_os_version >= 140000); +} - (void)applicationDidFinishLaunching:(NSNotification *)notification { if (fl_mac_os_version >= 101300 && [NSApp isRunning]) [NSApp stop:nil]; |
