<Swing Dev>  Review request for 7156657 Version 7 doesn't support translucent popup menus against a translucent window
anthony.petrov at oracle.com
Wed Jun 6 04:25:43 PDT 2012
I don't understand why this change is necessary. The current code simply
detects if a window is non-opaque and forces HW popups for such windows.
This works automatically and is very useful.
With this fix, however, most developers who use translucent windows,
will have to manually call setLightWeightPopupEnabled(false), which
doesn't look developer-friendly. Also, it changes the current behavior
causing a regression.
Instead of changing our own demo code and affecting developers who might
have already relied on the current behavior, why not simply suggest the
submitters of 7156657 to force LW popups for their specific use case?
On 6/6/2012 3:08 PM, Pavel Porvatov wrote:
> Please review a fix for the following issue:
> 7156657 Version 7 doesn't support translucent popup menus against a
> translucent window
> The webrev is here: http://cr.openjdk.java.net/~rupashka/7156657/
> The fix of CR 7027486 (JPopupMenu doesn't take window shape into
> account, http://hg.openjdk.java.net/jdk8/awt/jdk/rev/9024198193ce)
> doesn't take into account that some users use translucent windows with
> translucent menus. After discussions the following decision was made:
> 1. When JPopupMenu#setLightWeightPopupEnabled is set to false
> HEAVY_WEIGHT popups is used (instead of MEDIUM_WEIGHT). This fix was
> done in CR 6800513 (GTK-LaF renders menus incompletely,
> http://hg.openjdk.java.net/jdk8/awt/jdk/rev/cd00d68e06ac and
> http://hg.openjdk.java.net/jdk8/awt/jdk/rev/8800a98316b2) and that
> allows to use non-translucent and non-clipped popups for translucent or
> shaped windows
> 2. Fix of CR 7027486 should be reverted
> 3. The TransparentRuler should be corrected according new fix
More information about the swing-dev