From 49aa40bd678c67be3a5932d6fdc2a868c6702bbc Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Mon, 18 Mar 2013 21:21:51 +0100 Subject: [PATCH] IDEA-83557 After opening Structure view for the first time it is empty --- .../com/intellij/ide/impl/StructureViewWrapperImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/ide/impl/StructureViewWrapperImpl.java b/platform/lang-impl/src/com/intellij/ide/impl/StructureViewWrapperImpl.java index 69f0c62e12e0..2c19a3e692e7 100644 --- a/platform/lang-impl/src/com/intellij/ide/impl/StructureViewWrapperImpl.java +++ b/platform/lang-impl/src/com/intellij/ide/impl/StructureViewWrapperImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -136,7 +136,10 @@ public class StructureViewWrapperImpl implements StructureViewWrapper, Disposabl if (myProject.isDisposed()) return; final Component owner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); - if (SwingUtilities.isDescendingFrom(myToolWindow.getComponent(), owner) || JBPopupFactory.getInstance().isPopupActive()) return; + final boolean insideToolwindow = SwingUtilities.isDescendingFrom(myToolWindow.getComponent(), owner); + if (!myFirstRun && (insideToolwindow || JBPopupFactory.getInstance().isPopupActive())) { + return; + } final DataContext dataContext = DataManager.getInstance().getDataContext(owner); if (dataContext.getData(myKey) == this) return;