RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v3]

Alexander Zvegintsev azvegint at openjdk.org
Wed Jan 22 03:42:56 UTC 2025


On Wed, 22 Jan 2025 01:38:56 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

>> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   formatting
>
> test/jdk/javax/swing/JPopupMenu/NestedFocusablePopupTest.java line 105:
> 
>> 103: 
>> 104:     static void test1() throws Exception {
>> 105:         Point frameLocation = frame.getLocationOnScreen();
> 
> Is it better to have .getLocationOnScreen() calls within EDT?
> 
> Since getLocationOnScreen() has the possibility of throwing IIlegalCompnentStateException, do we check if the component is visible before calling getLocationOnScreen() especially in the context of pop menus and sub menus ?

We wait long enough, so if it throws the `IIlegalCompnentStateException` something is not right anyway.

But I updated it to `waitTillShown` + get location on EDT to save some test execution time where it is possible.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22729#discussion_r1924649014


More information about the client-libs-dev mailing list