From a0b16a0a9c9cf65bd155a4e76a882f2f32edff66 Mon Sep 17 00:00:00 2001 From: Denis Fokin Date: Tue, 8 Apr 2014 18:56:19 +0400 Subject: [PATCH] IDEA-123466 Sheet dialogs doesn't transfer focus back then closed --- .../intellij/openapi/wm/impl/ToolWindowManagerImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowManagerImpl.java index e9d3bea8559f..853e0e725a31 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowManagerImpl.java @@ -2072,13 +2072,13 @@ public final class ToolWindowManagerImpl extends ToolWindowManagerEx implements private final class EditorComponentFocusWatcher extends FocusWatcher { @Override protected void focusedComponentChanged(final Component component, final AWTEvent cause) { - if (myWindowManager.getCommandProcessor().getCommandCount() > 0 || component == null) { - return; - } - final KeyboardFocusManager mgr = KeyboardFocusManager.getCurrentKeyboardFocusManager(); final Component owner = mgr.getFocusOwner(); + if (myWindowManager.getCommandProcessor().getCommandCount() > 0 || component == null || component== owner) { + return; + } + IdeFocusManager.getInstance(myProject).doWhenFocusSettlesDown(new ExpirableRunnable.ForProject(myProject) { @Override public void run() {