src/macosx/native/sun/awt/LWCToolkit.m

Print this page

        

@@ -32,10 +32,11 @@
 #import "LWCToolkit.h"
 #import "ThreadUtilities.h"
 #import "AWT_debug.h"
 #import "CSystemColors.h"
 #import  "NSApplicationAWT.h"
+#import "ApplicationDelegate.h"
 
 #import "sun_lwawt_macosx_LWCToolkit.h"
 
 #import "sizecalc.h"
 

@@ -437,11 +438,11 @@
     __block jboolean active = JNI_FALSE;
 
 JNF_COCOA_ENTER(env);
 
     [ThreadUtilities performOnMainThreadWaiting:YES block:^() {
-        active = (jboolean)[NSRunningApplication currentApplication].active;
+        active = (jboolean) [[ApplicationDelegate sharedDelegate] isAppActive];
     }];
 
 JNF_COCOA_EXIT(env);
 
     return active;