On Thu, 6 Jun 2024 07:16:42 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

> I guess it needs to be understood why it is not failing in windows and linux 
> and only reproducible in macos. The fix in BasicLookAndFeel is not 
> appropriate in my opinion as that shared code will be exercised in windows 
> and linux too..
> 
> I guess we need to find out why `BasicLookAndFeel.evenDIspatched` is called 
> for MOUSE_PRESSED in macos and not in windows/linux (ie only called for 
> MOUSE_RELEASED event), maybe something needs to be done in macos JDK native 
> event processing to ensure it is only called for "mouse release" event for 
> showing popup.
> 
> Also, the test can be automated as it is about popup being shown or not which 
> can be easily checked by `isPopupMenuVIsible/isVisible` method

I guess the root of the issue is that MOUSE_ENTERED is a popup trigger in macos 
only. I can look into NSEvent isPopupTrigger and change the code to require the 
event to be MOUSE_PRESSED/MOUSE_RELEASED

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

PR Comment: https://git.openjdk.org/jdk/pull/19569#issuecomment-2152817659

Reply via email to