changeset 4660:534f984e18bc

7124303: [macosx] SwingSet2 - Control + Spacebar causes hang. Reviewed-by: kmiller, swingler, kizune
author ptbrunet
date Tue, 17 Jan 2012 17:26:50 +0300
parents ffe93c01d5be
children 02a0c46f9a52
files src/macosx/native/sun/awt/AWTView.m src/macosx/native/sun/awt/JavaComponentAccessibility.m
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/native/sun/awt/AWTView.m	Mon Jan 16 14:26:51 2012 +0000
+++ b/src/macosx/native/sun/awt/AWTView.m	Tue Jan 17 17:26:50 2012 +0300
@@ -150,7 +150,9 @@
 
     [AWTToolkit eventCountPlusPlus];
 
-    [[self window] makeFirstResponder: self];
+    [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^() {
+        [[self window] makeFirstResponder: self];
+    }];
     if ([self window] != NULL) {
         [self resetTrackingRect];
     }
--- a/src/macosx/native/sun/awt/JavaComponentAccessibility.m	Mon Jan 16 14:26:51 2012 +0000
+++ b/src/macosx/native/sun/awt/JavaComponentAccessibility.m	Tue Jan 17 17:26:50 2012 +0300
@@ -575,7 +575,7 @@
     }
 
 #ifdef JAVA_AX_DEBUG
-    NSLog(@"Warning in %s: could not find attribute names for role: %@", __FUNCTION__, javaRole);
+    NSLog(@"Warning in %s: could not find attribute names for role: %@", __FUNCTION__, [self javaRole]);
 #endif
 
     return nil;