Merge branch 'master' of git.labs.intellij.net:idea/community

This commit is contained in:
sweinreuter
2011-03-10 19:06:01 +01:00
3 changed files with 7 additions and 2 deletions
@@ -93,7 +93,7 @@ public abstract class ResizeToolWindowAction extends AnAction implements DumbAwa
window = mgr.getToolWindow(mgr.getActiveToolWindowId());
}
if (window == null || !window.isAvailable() || !window.isVisible() || window.getType() == ToolWindowType.FLOATING) {
if (window == null || !window.isAvailable() || !window.isVisible() || window.getType() == ToolWindowType.FLOATING || !window.isActive()) {
setDisabled(e);
return;
}
@@ -131,6 +131,7 @@ public final class ToolWindowImpl implements ToolWindowEx {
public final boolean isActive() {
ApplicationManager.getApplication().assertIsDispatchThread();
if (myToolWindowManager.isEditorComponentActive()) return false;
return myToolWindowManager.isToolWindowActive(myId) || (myDecorator != null && myDecorator.isFocused());
}
@@ -1093,7 +1093,11 @@ public class AbstractPopup implements JBPopup {
myForcedLocation = screenPoint;
}
else {
moveTo(myContent, screenPoint, myLocateByContent ? myHeaderPanel.getPreferredSize() : null);
Insets insets = myPopupBorder.getBorderInsets(myContent);
if (insets == null) {
insets = new Insets(0, 0, 0, 0);
}
moveTo(myContent, new Point(screenPoint.x - insets.left, screenPoint.y - insets.top), myLocateByContent ? myHeaderPanel.getPreferredSize() : null);
}
}