< prev index next >
src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m
Print this page
rev 54098 : 8260616: Removing remaining JNF dependencies in the java.desktop module
8259729: Missed JNFInstanceOf -> IsInstanceOf conversion
@@ -158,13 +158,10 @@
}
[super finishLaunching];
[[NSUserNotificationCenter defaultUserNotificationCenter] setDelegate:self];
-
- // inform any interested parties that the AWT has arrived and is pumping
- [[NSNotificationCenter defaultCenter] postNotificationName:JNFRunLoopDidStartNotification object:self];
}
- (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center
shouldPresentNotification:(NSUserNotification *)notification
{
@@ -269,11 +266,11 @@
}
// HACK BEGIN
// The following is necessary to make the java process behave like a
// proper foreground application...
- [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
+ [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
ProcessSerialNumber psn;
GetCurrentProcess(&psn);
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
[NSApp activateIgnoringOtherApps:YES];
@@ -324,12 +321,12 @@
}
+ (void) runAWTLoopWithApp:(NSApplication*)app {
NSAutoreleasePool *pool = [NSAutoreleasePool new];
- // Make sure that when we run in AWTRunLoopMode we don't exit randomly
- [[NSRunLoop currentRunLoop] addPort:[NSPort port] forMode:[JNFRunLoop javaRunLoopMode]];
+ // Make sure that when we run in javaRunLoopMode we don't exit randomly
+ [[NSRunLoop currentRunLoop] addPort:[NSPort port] forMode:[ThreadUtilities javaRunLoopMode]];
do {
@try {
[app run];
} @catch (NSException* e) {
< prev index next >