mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-145540 Issues with tool window in "windowed mode"
This commit is contained in:
+10
@@ -28,11 +28,14 @@ import com.intellij.openapi.wm.impl.ToolWindowImpl;
|
||||
import com.intellij.openapi.wm.impl.WindowManagerImpl;
|
||||
import com.intellij.openapi.wm.impl.WindowWatcher;
|
||||
import com.intellij.util.Alarm;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
import static com.intellij.openapi.wm.ToolWindowType.WINDOWED;
|
||||
|
||||
/**
|
||||
* Requests focus for the specified tool window.
|
||||
*
|
||||
@@ -153,6 +156,13 @@ public final class RequestFocusInToolWindowCmd extends FinalizableCommand {
|
||||
return;
|
||||
}
|
||||
if (c.isShowing()) {
|
||||
if (WINDOWED == myToolWindow.getType()) {
|
||||
Window window = UIUtil.getWindow(c);
|
||||
if (window instanceof Frame) {
|
||||
Frame frame = (Frame)window;
|
||||
frame.setState(Frame.NORMAL);
|
||||
}
|
||||
}
|
||||
final Component owner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getPermanentFocusOwner();
|
||||
if (owner != null && owner == c) {
|
||||
myManager.getFocusManager().requestFocus(new FocusCommand() {
|
||||
|
||||
Reference in New Issue
Block a user