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

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Thu Jul 23 09:28:54 UTC 2020


Hi All,

Please review a fix for an issue in macos where regression test 
javax/swing/JPopupMenu/6800513/bug6800513.java fails with

java.lang.Exception: popup class is: 
javax.swing.PopupFactory$HeavyWeightPopup, expected: 
javax.swing.PopupFactory$LightWeightPopup

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.

Bug: https://bugs.openjdk.java.net/browse/JDK-7184956

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

Regards
Prasanta


More information about the swing-dev mailing list