src/macosx/native/sun/awt/awt.m
Print this page
@@ -305,10 +305,11 @@
// AWT gets here AFTER +[AWTStarter appKitIsRunning:] is called.
if (verbose) AWT_DEBUG_LOG(@"got out of the AppKit startup mutex");
}
+ if (!headless) {
// Don't set the delegate until the NSApplication has been created and
// its finishLaunching has initialized it.
// ApplicationDelegate is the support code for com.apple.eawt.
void (^setDelegateBlock)() = ^(){
OSXAPP_SetApplicationDelegate([ApplicationDelegate sharedDelegate]);
@@ -316,10 +317,11 @@
if (onMainThread) {
setDelegateBlock();
} else {
[JNFRunLoop performOnMainThreadWaiting:YES withBlock:setDelegateBlock];
}
+ }
}
- (void)starter:(NSArray*)args {
NSAutoreleasePool *pool = [NSAutoreleasePool new];