Compare commits

..

6 Commits
1861 ... 1865

4 changed files with 16 additions and 9 deletions

View File

@@ -528,7 +528,11 @@ static NSString* parentRole(NSAccessibilityRole nsRole)
return NO;
}
return isChildSelected(env, ((JavaComponentAccessibility *)[self parent])->fAccessible, fIndex, fComponent);
id parent = [self parent];
if ([parent isKindOfClass:[JavaComponentAccessibility class]]) {
return isChildSelected(env, ((JavaComponentAccessibility *)parent)->fAccessible, fIndex, fComponent);
}
return NO;
}
- (BOOL)isSelectable:(JNIEnv *)env
@@ -764,7 +768,7 @@ static NSString* parentRole(NSAccessibilityRole nsRole)
point.y += size.height;
// Now make it into Cocoa screen coords.
point.y = [[[[self view] window] screen] frame].size.height - point.y;
point.y = [[NSScreen screens][0] frame].size.height - point.y;
return NSMakeRect(point.x, point.y, size.width, size.height);
}
@@ -1081,7 +1085,7 @@ static NSNumber* JavaNumberToNSNumber(JNIEnv *env, jobject jnumber) {
"(Ljava/awt/Container;FF)Ljavax/accessibility/Accessible;", nil);
// Make it into java screen coords
point.y = [[[[self view] window] screen] frame].size.height - point.y;
point.y = [[NSScreen screens][0] frame].size.height - point.y;
jobject jparent = fComponent;

View File

@@ -26,10 +26,13 @@ static BOOL javaObjectEquals(JNIEnv *env, jobject a, jobject b, jobject componen
- (jobject)tabGroup {
if (fTabGroupAxContext == NULL) {
JNIEnv* env = [ThreadUtilities getJNIEnv];
jobject tabGroupAxContext = [(JavaComponentAccessibility *)[self parent] axContextWithEnv:env];
fTabGroupAxContext = (*env)->NewWeakGlobalRef(env, tabGroupAxContext);
CHECK_EXCEPTION();
(*env)->DeleteLocalRef(env, tabGroupAxContext);
id parent = [self parent];
if ([parent isKindOfClass:[JavaComponentAccessibility class]]) {
jobject tabGroupAxContext = [(JavaComponentAccessibility *)parent axContextWithEnv:env];
fTabGroupAxContext = (*env)->NewWeakGlobalRef(env, tabGroupAxContext);
CHECK_EXCEPTION();
(*env)->DeleteLocalRef(env, tabGroupAxContext);
}
}
return fTabGroupAxContext;
}

View File

@@ -83,10 +83,11 @@ static NSString* uiBoldName = nil;
(uiBoldName != nil && [name isEqualTo:uiBoldName])) {
if (style & java_awt_Font_BOLD) {
nsFont = [NSFont boldSystemFontOfSize:1.0];
nsFallbackBase = [NSFont fontWithName:@"LucidaGrande-Bold" size:1.0];
} else {
nsFont = [NSFont systemFontOfSize:1.0];
nsFallbackBase = [NSFont fontWithName:@"LucidaGrande" size:1.0];
}
nsFallbackBase = [NSFont fontWithName:@"Lucida Grande" size:1.0];
#ifdef DEBUG
NSLog(@"nsFont-name is : %@", nsFont.familyName);
NSLog(@"nsFont-family is : %@", nsFont.fontName);

View File

@@ -1 +0,0 @@
java/awt/dnd/RemoveDropTargetCrashTest/RemoveDropTargetCrashTest.java JBR-4081 macosx-all