EA-83059 - IAE: PopupComponent$DialogPopupWrapper.<init>
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Thu, 26 May 2016 21:51:45 +0000 (00:51 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Thu, 26 May 2016 21:53:20 +0000 (00:53 +0300)
platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java
platform/platform-impl/src/com/intellij/ui/popup/PopupComponent.java

index 7f9eb7e6c12b1b69f7b83bd02cefb9348be8a1d6..7f7429e0f56af30669981ac1bf3267a859d93881 100644 (file)
@@ -445,7 +445,7 @@ public class AbstractPopup implements JBPopup {
       window = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow();
     }
 
-    if (window != null) {
+    if (window != null && window.isShowing()) {
       showInCenterOf(window);
     }
   }
index 5d47fbce983b839a2e052f01b53cbfc5049f709c..fb1c4cd953f39a3935c4999a424411d7f038da3a 100644 (file)
@@ -111,7 +111,7 @@ public interface PopupComponent {
 
     public DialogPopupWrapper(Component owner, Component content, int x, int y, JBPopup jbPopup) {
       if (!owner.isShowing()) {
-        throw new IllegalArgumentException("Popup owner must be showing");
+        throw new IllegalArgumentException("Popup owner must be showing, owner " + owner.getClass());
       }
 
       final Window wnd = UIUtil.getWindow(owner);