neilcsmith-net commented on code in PR #5280:
URL: https://github.com/apache/netbeans/pull/5280#discussion_r1073899226
##########
platform/openide.util.ui/src/org/openide/util/Utilities.java:
##########
@@ -1345,8 +1362,8 @@ public static Component findDialogParent() {
parent =
KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
}
if (parent == null) {
- Frame[] f = Frame.getFrames();
- parent = f.length == 0 ? null : f[f.length - 1];
+ // PR#5280
+ parent = findMainWindow();
Review Comment:
@errael I would possibly fall back to the original behaviour if the search
for the main window returns null. Ideally it wouldn't use the name to find the
right window, but that might be the easiest way to achieve. I have no idea how
many people (if any!) use `FileChoooserBuilder` outside of the standard window
system, but this will change the behaviour of those cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists