mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-97354 Show diff appears under main frame
This commit is contained in:
+6
-1
@@ -124,6 +124,11 @@ public final class RequestFocusInToolWindowCmd extends FinalizableCommand {
|
||||
|
||||
private void bringOwnerToFront() {
|
||||
final Window owner = SwingUtilities.getWindowAncestor(myToolWindow.getComponent());
|
||||
//Toolwindow component shouldn't take focus back if new dialog or frame appears
|
||||
//Example: Ctrl+D on file history brings a diff dialog to front and then hides it by main frame by calling
|
||||
// toFront on toolwindow window
|
||||
Window activeFrame = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
|
||||
if (activeFrame != null && activeFrame != owner) return;
|
||||
//if (owner == null) {
|
||||
// System.out.println("owner = " + owner);
|
||||
// return;
|
||||
@@ -131,7 +136,7 @@ public final class RequestFocusInToolWindowCmd extends FinalizableCommand {
|
||||
// if owner is active window or it has active child window which isn't floating decorator then
|
||||
// don't bring owner window to font. If we will make toFront every time then it's possible
|
||||
// the following situation:
|
||||
// 1. user prform refactoring
|
||||
// 1. user perform refactoring
|
||||
// 2. "Do not show preview" dialog is popping up.
|
||||
// 3. At that time "preview" tool window is being activated and modal "don't show..." dialog
|
||||
// isn't active.
|
||||
|
||||
Reference in New Issue
Block a user