use SwingUtil.getWindowAncestor

This commit is contained in:
Sergey Ignatov
2015-04-27 21:51:06 +03:00
parent c48b7c62c8
commit 6aa33bd9c3
@@ -202,7 +202,7 @@ public class GotoActionAction extends GotoActionBase implements DumbAware {
if (action instanceof ActionGroup && ((ActionGroup)action).getChildren(event).length > 0) {
ListPopup popup = JBPopupFactory.getInstance().createActionGroupPopup(
event.getPresentation().getText(), (ActionGroup)action, context, JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, false);
Window window = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow();
Window window = SwingUtilities.getWindowAncestor(component);
if (window != null) {
popup.showInCenterOf(window);
}