RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v4]
Harshitha Onkar
honkar at openjdk.org
Wed Jan 22 20:05:50 UTC 2025
On Wed, 22 Jan 2025 03:42:56 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
>> The previous [JDK-8319103](https://bugs.openjdk.org/browse/JDK-8319103) fix was not complete.
>>
>> The case where a menu item with a focusable component was not a direct child of a window was missing(failing the `if (window == oppositeWindow.getParent() ) {` check), so the ungrab event was posted prematurely.
>>
>> This can be fixed by adding `waylandWindowFocusListener` to all submenus in hierarchy.
>>
>> The manual test updated to use this case, and also added an automated test that checks that it didn't close prematurely.
>
> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>
> getLocationOnScreen on EDT
@aivanov-jdk
> What if the window that loses focus is not the parent of the popup hierarchy? Or is it guaranteed that all the children of the popup window receive the focus lost event?
Doesn't FocusablePopupDismissTest.java & NestedFocusablePopupTest.java cover this case (Focusable item > sub item) or is the above case different?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22729#issuecomment-2608155867
More information about the client-libs-dev
mailing list