<Swing Dev> RFR: 8266249: javax/swing/JPopupMenu/7156657/bug7156657.java fails on macOS [v4]
Alexander Zuev
kizune at openjdk.java.net
Tue May 11 04:21:56 UTC 2021
On Mon, 10 May 2021 21:47:31 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Small fixes
>
> test/jdk/javax/swing/JPopupMenu/7156657/bug7156657.java line 113:
>
>> 111: public Rectangle call() throws Exception {
>> 112: return new Rectangle(popupMenu.getLocationOnScreen(),
>> 113: popupMenu.getSize());
>
> Does it mean that the getBounds method returns the wrong coordinate?
As per documentation - it returns coordinates related to the parent. Parent was a frameless window that we asked to go to 0,0 which means that parent coordinates == screen coordinates. With one exception - on Mac OS the menu bar is on the top and the window got shifted by the insets introduced by it. So, yes, in this case coordinates were incorrect. Or rather we used the wrong method to retrieve them.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3844
More information about the swing-dev
mailing list