7027486: JPopupMenu doesn't take window shape into account
authoralexp
Tue, 29 Mar 2011 21:02:53 +0400
changeset 8976 84470d24137d
parent 8975 c2ef298160dd
child 8977 139a072009cb
7027486: JPopupMenu doesn't take window shape into account Reviewed-by: rupashka
jdk/src/share/classes/javax/swing/PopupFactory.java
--- a/jdk/src/share/classes/javax/swing/PopupFactory.java	Mon Mar 28 18:00:32 2011 +0900
+++ b/jdk/src/share/classes/javax/swing/PopupFactory.java	Tue Mar 29 21:02:53 2011 +0400
@@ -203,6 +203,12 @@
                     popupType = HEAVY_WEIGHT_POPUP;
                     break;
                 }
+            } else if (c instanceof Window) {
+                Window w = (Window) c;
+                if (!w.isOpaque() || w.getOpacity() < 1 || w.getShape() != null) {
+                    popupType = HEAVY_WEIGHT_POPUP;
+                    break;
+                }
             }
             c = c.getParent();
         }