--- 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);