Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning message on Mac about secure coding not enabled #632

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ static const char* jvmLibs[] = { "libjvm.dylib", "libjvm.jnilib", "libjvm.so", N
/* Define the window system arguments for the various Java VMs. */
static char* argVM_JAVA[] = { "-XstartOnFirstThread", NULL };

@interface AppDelegate : NSObject <NSApplicationDelegate>
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app;
@end

@implementation AppDelegate
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app {
return YES;
}
@end

static NSWindow* window = nil;
@interface KeyWindow : NSWindow { }
- (BOOL)canBecomeKeyWindow;
Expand All @@ -106,7 +116,7 @@ static NSWindow* window = nil;

int result = ENOENT;
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
[NSApplication sharedApplication];
[[NSApplication sharedApplication] setDelegate: [[AppDelegate alloc] init]];
NSImage* image = [[NSImage alloc] initByReferencingFile: featureImage];
[featureImage release];
if (image != NULL) {
Expand Down
Loading