8278609: [macos] accessibility frame is misplaced on a secondary monitor on macOS
Reviewed-by: ant, kizune
This commit is contained in:
parent
deaf75a585
commit
ad1282842c
@ -792,7 +792,7 @@ static jobject sAccessibilityClass = NULL;
|
||||
(*env)->DeleteLocalRef(env, axComponent);
|
||||
point.y += size.height;
|
||||
|
||||
point.y = [[[[self view] window] screen] frame].size.height - point.y;
|
||||
point.y = [[[NSScreen screens] objectAtIndex:0] frame].size.height - point.y;
|
||||
|
||||
return NSMakeRect(point.x, point.y, size.width, size.height);
|
||||
}
|
||||
@ -990,7 +990,7 @@ static jobject sAccessibilityClass = NULL;
|
||||
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] objectAtIndex:0] frame].size.height - point.y;
|
||||
|
||||
return point;
|
||||
}
|
||||
@ -1098,7 +1098,7 @@ static jobject sAccessibilityClass = NULL;
|
||||
"(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] objectAtIndex:0] frame].size.height - point.y;
|
||||
|
||||
jobject jparent = fComponent;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user