From: Sergey Simonchik Date: Thu, 26 May 2016 21:51:45 +0000 (+0300) Subject: EA-83059 - IAE: PopupComponent$DialogPopupWrapper. X-Git-Tag: dbe/162.509~2 X-Git-Url: https://git.jetbrains.org/?p=idea%2Fcommunity.git;a=commitdiff_plain;h=5310cb09b3f3e49b013981363584f12fe5ee8c6d EA-83059 - IAE: PopupComponent$DialogPopupWrapper. --- diff --git a/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java b/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java index 7f9eb7e6c12b..7f7429e0f56a 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java @@ -445,7 +445,7 @@ public class AbstractPopup implements JBPopup { window = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow(); } - if (window != null) { + if (window != null && window.isShowing()) { showInCenterOf(window); } } diff --git a/platform/platform-impl/src/com/intellij/ui/popup/PopupComponent.java b/platform/platform-impl/src/com/intellij/ui/popup/PopupComponent.java index 5d47fbce983b..fb1c4cd953f3 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/PopupComponent.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/PopupComponent.java @@ -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);