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

Alexey Ivanov aivanov at openjdk.org
Mon Jan 20 19:58:35 UTC 2025


On Mon, 20 Jan 2025 19:28:20 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Updated to cover this case by adding the listener to all owned windows.
>
> I'm still unconvinced the listener is always removed…
> 
> Shouldn't the line below
> 
> https://github.com/openjdk/jdk/blob/b60a33269247c1039fa0ec6cd99476c9f8976852/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java#L563
> 
> be changed to call `dismissPopupOnFocusLostIfNeededCleanUp` to remove the listener from the popup and its children?

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?

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

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


More information about the client-libs-dev mailing list