jdk/src/macosx/native/sun/awt/awt.m
changeset 21241 dc8cd488885d
parent 20453 e480eb64d2c2
child 23010 6dadb192ad81
equal deleted inserted replaced
21240:fca30a64f6ed 21241:dc8cd488885d
   310 
   310 
   311         // AWT gets here AFTER +[AWTStarter appKitIsRunning:] is called.
   311         // AWT gets here AFTER +[AWTStarter appKitIsRunning:] is called.
   312         if (verbose) AWT_DEBUG_LOG(@"got out of the AppKit startup mutex");
   312         if (verbose) AWT_DEBUG_LOG(@"got out of the AppKit startup mutex");
   313     }
   313     }
   314 
   314 
   315     // Don't set the delegate until the NSApplication has been created and
   315     if (!headless) {
   316     // its finishLaunching has initialized it.
   316         // Don't set the delegate until the NSApplication has been created and
   317     //  ApplicationDelegate is the support code for com.apple.eawt.
   317         // its finishLaunching has initialized it.
   318     [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
   318         //  ApplicationDelegate is the support code for com.apple.eawt.
   319         id<NSApplicationDelegate> delegate = [ApplicationDelegate sharedDelegate];
   319         [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
   320         if (delegate != nil) {
   320             id<NSApplicationDelegate> delegate = [ApplicationDelegate sharedDelegate];
   321             OSXAPP_SetApplicationDelegate(delegate);
   321             if (delegate != nil) {
   322         }        
   322                 OSXAPP_SetApplicationDelegate(delegate);
   323     }];
   323             }        
       
   324         }];
       
   325     }
   324 }
   326 }
   325 
   327 
   326 - (void)starter:(NSArray*)args {
   328 - (void)starter:(NSArray*)args {
   327     NSAutoreleasePool *pool = [NSAutoreleasePool new];
   329     NSAutoreleasePool *pool = [NSAutoreleasePool new];
   328 
   330