Skip to content

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: goetz
  • Loading branch information
Jonathan Dowland authored and RealCLanger committed Jul 7, 2022
1 parent 05b9400 commit a4642ae
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -805,7 +805,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 @@ -1005,7 +1005,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 @@ -1114,7 +1114,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 a4642ae

@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.