On Wed, 6 Mar 2024 07:59:10 GMT, Johan Vos <j...@openjdk.org> wrote:

>> A listener was added but never removed.
>> This patch removes the listener when the menu it links to is cleared. Fix 
>> for https://bugs.openjdk.org/browse/JDK-8319779
>
> Johan Vos has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Ignore test in case the underlying GlassSystemMenu is not supported.

I think the logic in GlassSystemMenu should ultimately be platform-independent. 
Hence, moving the Apple-menu specific code to a Mac-specific class (in glass) 
sounds the right thing to do. However, it might be more pragmatic that we wait 
with this refactory until we have a second (or third) platform implementation. 
I can imagine there will need to be more changes if we deal with different 
linux window management systems.
Hence, for now I agree having an `assumeTrue(glassSystemMenu.isSupported())` is 
the easiest solution (and not an incorrect one).

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

PR Comment: https://git.openjdk.org/jfx/pull/1283#issuecomment-1980284312

Reply via email to