jdk/src/macosx/native/sun/awt/LWCToolkit.m
changeset 15322 3638f33225ec
parent 13991 e62879b84a14
child 15985 b9e25a486549
--- a/jdk/src/macosx/native/sun/awt/LWCToolkit.m	Fri Jan 18 14:17:11 2013 +0400
+++ b/jdk/src/macosx/native/sun/awt/LWCToolkit.m	Fri Jan 18 18:17:02 2013 +0400
@@ -415,13 +415,9 @@
 
 JNF_COCOA_ENTER(env);
 
-    if ([NSThread isMainThread]) {
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^() {
         active = (jboolean)[NSRunningApplication currentApplication].active;
-    } else {
-        [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^() {
-            active = (jboolean)[NSRunningApplication currentApplication].active;
-        }];
-    }
+    }];
 
 JNF_COCOA_EXIT(env);