< prev index next >

src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m

Print this page

        

@@ -75,10 +75,12 @@
     return [super init];
 }
 
 - (void)dealloc
 {
+    [[NSUserNotificationCenter defaultUserNotificationCenter] setDelegate:nil];
+
     [fApplicationName release];
     fApplicationName = nil;
 
     [super dealloc];
 }

@@ -136,14 +138,22 @@
         [self setDelegate:qad];
     }
 
     [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
+{
+    return YES; // We always show notifications to the user
+}
+
 - (void) registerWithProcessManager
 {
     // Headless: NO
     // Embedded: NO
     // Multiple Calls: NO
< prev index next >