changeset 3850:9024198193ce

7027486: JPopupMenu doesn't take window shape into account Reviewed-by: rupashka
author alexp
date Tue, 29 Mar 2011 21:02:53 +0400
parents cf381d73bd1f
children bdd09379168e
files src/share/classes/javax/swing/PopupFactory.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/PopupFactory.java	Mon Mar 28 18:00:32 2011 +0900
+++ b/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();
         }