mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-29 08:08:32 +08:00
Test fix for splash screen test
This commit is contained in:
@@ -1735,11 +1735,7 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
|||||||
}
|
}
|
||||||
|
|
||||||
Component bestCenter = getJavaActiveWindow();
|
Component bestCenter = getJavaActiveWindow();
|
||||||
Window bestParent = getParentWindow(bestCenter);
|
Window bestParent = getBestParent(provider, bestCenter);
|
||||||
|
|
||||||
if (!provider.isModal()) {
|
|
||||||
bestParent = getBestNonModalParent(provider, bestParent);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Note: prefer the active window; allow user's choice of center component when it is
|
// 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,
|
private static Window getBestNonModalParent(DialogComponentProvider newProvider,
|
||||||
Window bestParent) {
|
Window bestParent) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user