<Swing Dev> RFR: 8266249: javax/swing/JPopupMenu/7156657/bug7156657.java fails on macOS [v2]

Alexander Zuev kizune at openjdk.java.net
Fri May 7 21:35:45 UTC 2021


On Fri, 7 May 2021 16:00:37 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> I'm not sure about this change...Maybe changing frame location from (0,0) at l192 to middle of screen though selLocationRelativeTo() may be enough to make the test more stable in CI systems.

The problem here is not only in location but in the screenshot taking area outside of the popup and analyzing it. That is one of the reasons why test is unreliable - it analyzes the wrong place. And moving frame to the different position will not help either - the problem is not that system menubar overlaps the popup - it does not, the problem is that we are catching part of the menubar because we do not adjust for the offset it introduces to the screen coordinates. Here's the screenshot, note that area we are analyzing is one outlined with cyan borders. By not adjusting the location we just catching random stuff.
![dev0scr0](https://user-images.githubusercontent.com/69642324/117507970-acfb9700-af3c-11eb-8791-a1fe62e140a9.png)

-------------

PR: https://git.openjdk.java.net/jdk/pull/3844


More information about the swing-dev mailing list