Hi Anthony,
Hi Pavel,

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.
Yes, it's very useful but produces the regression that described in CR 7156657.

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.
Current behavior contains a regression from older release jdk6, so reverting fix of CR 7027486 (JPopupMenu doesn't take window shape into account) doesn't look like 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?
Unfortunately there is no way to force LW popups, so there is no workaround for the problem

Regards, Pavel

--
best regards,
Anthony

On 6/6/2012 3:08 PM, Pavel Porvatov wrote:
Hello,

Please review a fix for the following issue:
7156657 Version 7 doesn't support translucent popup menus against a translucent window
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7156657

The webrev is here: http://cr.openjdk.java.net/~rupashka/7156657/ <http://cr.openjdk.java.net/%7Erupashka/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

Regards,
Pavel.


Reply via email to