mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-88022
This commit is contained in:
@@ -33,6 +33,9 @@ public class OwnerOptional {
|
||||
@NotNull
|
||||
private static Window findOwnerByComponent(Component component) {
|
||||
if (component == null) component = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
|
||||
if (component == null) {
|
||||
component = Window.getWindows()[0];
|
||||
}
|
||||
return (component instanceof Window) ? (Window) component : SwingUtilities.getWindowAncestor(component);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user