mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-20 23:08:31 +08:00
Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fix-2-19-21'
This commit is contained in:
@@ -1735,11 +1735,7 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
||||
}
|
||||
|
||||
Component bestCenter = getJavaActiveWindow();
|
||||
Window bestParent = getParentWindow(bestCenter);
|
||||
|
||||
if (!provider.isModal()) {
|
||||
bestParent = getBestNonModalParent(provider, bestParent);
|
||||
}
|
||||
Window bestParent = getBestParent(provider, bestCenter);
|
||||
|
||||
//
|
||||
// Note: prefer the active window; allow user's choice of center component when it is
|
||||
@@ -1762,6 +1758,20 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
||||
}
|
||||
}
|
||||
|
||||
private static Window getBestParent(DialogComponentProvider provider, Component component) {
|
||||
Window bestParent = getParentWindow(component);
|
||||
if (!provider.isModal()) {
|
||||
bestParent = getBestNonModalParent(provider, bestParent);
|
||||
}
|
||||
|
||||
if (bestParent == null) {
|
||||
KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
|
||||
bestParent = kfm.getActiveWindow();
|
||||
}
|
||||
|
||||
return bestParent;
|
||||
}
|
||||
|
||||
private static Window getBestNonModalParent(DialogComponentProvider newProvider,
|
||||
Window bestParent) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user