<Swing Dev> RFR JDK-7184956: [macosx] JPopupMenu.setDefaultLightPopupEnable(true) doesn't work correctly

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Mon Jul 27 06:42:33 UTC 2020


On 24-Jul-20 4:45 AM, Sergey Bylokhov wrote:
> Hi, Prasanta.
>
>> This is because com.apple.laf.ScreenPopupFactory#getPopup method 
>> always sets HEAVY_WEIGHT_POPUP when 
>> com.apple.laf.ScreenPopupFactory#fIsActive is true and fIsActive is 
>> always set to true in AquaLookAndFeel#initialize()>> Proposed fix is 
>> to use PopupFactory.getPopup() and let the PopupFactory decide which 
>> popup type to show.
> I would like to highlight that the ScreenPopupFactory itself is also a 
> PopupFactory, and
> it intentionally overrides getPopup() method to always return HW 
> popup, because other
> popup types are not implemented by the Aqua L&F,

OK. I could not see any JBS issue asking for non-HW popup support in 
AquaL&F (even this issue is about regression testcase failing in mac) 
and we got mac build in jdk6 timeframe (so it's been a long way since),  
so it seems to me non-HW popup support is not needed for AquaL&F.

Can we put a check in the test to omit this from Aqua

http://cr.openjdk.java.net/~psadhukhan/7184956/webrev.1/

and ask from community if non-HW popup is indeed needed for Aqua, in 
which case we can create an enhancement task in JBS?

Regards
Prasanta
> you can check that by the menubar/menuites
> in the SwingSet2, after the fix the popuop menu does not look like the 
> native popup due to
> absent of shadows/transparency.
>
>


More information about the swing-dev mailing list