IDEA-123466 Sheet dialogs doesn't transfer focus back then closed

This commit is contained in:
Denis Fokin
2014-04-08 18:57:04 +04:00
parent e46486e42d
commit a0b16a0a9c
@@ -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() {