Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk18 Public archive

Commit

Permalink
8278609: [macos] accessibility frame is misplaced on a secondary moni…
Browse files Browse the repository at this point in the history
…tor on macOS

Reviewed-by: ant, kizune
  • Loading branch information
VeselovAlex authored and Anton Tarasov committed Dec 20, 2021
1 parent deaf75a commit ad12828
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ - (NSRect)accessibilityFrame
(*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);
}
Expand Down Expand Up @@ -990,7 +990,7 @@ - (NSPoint)accessibilityActivationPoint
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;
}
Expand Down Expand Up @@ -1098,7 +1098,7 @@ - (id)accessibilityHitTest:(NSPoint)point
"(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;

Expand Down

1 comment on commit ad12828

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.