RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v3]
Harshitha Onkar
honkar at openjdk.org
Wed Jan 22 20:00:50 UTC 2025
On Wed, 22 Jan 2025 03:39:44 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
>> 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.
Sounds good.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22729#discussion_r1925887880
More information about the client-libs-dev
mailing list