JBR-4107 A11y: macOS - wrong frame position if window is not on primary screen

This commit is contained in:
Aleksandr Veselov
2021-12-10 18:25:14 +03:00
committed by Anton Tarasov
parent 6b36a9227d
commit c4cb87ff06

View File

@@ -1008,7 +1008,7 @@ static NSObject *sAttributeNamesLOCK = nil;
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 [NSValue valueWithPoint:point];
}
@@ -1385,7 +1385,7 @@ static NSObject *sAttributeNamesLOCK = nil;
"(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;