private static Window getBestNonModalParent(DialogComponentProvider providerToShow,
			Window bestParent) {

		Window activeWindow = getJavaActiveWindow();
		if (!(activeWindow instanceof DockingDialog)) {
			return bestParent;
		}

		DockingDialog dialog = (DockingDialog) activeWindow;
		if (!dialog.isModal()) {

			// Note: See issue 'E' described in getParentWindow()
			// If we parent to a non-modal progress dialog (which is odd), when it goes away, so
			// to do we.   Assume that non-modal dialogs in general are long lived.   We shall only
			// enforce parenting to modal dialogs as defined below in order to prevent blocking of
			// the non-modal dialog.

			return bestParent; // not modal; assume no issues
		}

		DialogComponentProvider activeProvider = dialog.getComponent();
		if (activeProvider == null) {
			return bestParent;
		}

		int activeId = activeProvider.getId();
		int providerId = providerToShow.getId();
		if (providerId < activeId) {
			// The provider being shown is older than the active window--do not parent the provider
			// to that window.  The older age suggests that the new provider was shown on a delay
			// and should really be considered to live behind the active modal dialog.
			return bestParent;
		}

		if (activeProvider.isTransient()) {
			// This prevents transient modal dialogs from being parents to non-modal dialogs.  This
			// can cause the non-modal dialog to be closed when the transient modal dialog goes
			// away.  There is the possibility of the non-modal dialog being blocked if not parented
			// the this modal dialog.   If we find a use case that exposes this pattern, then we
			// will have to revisit how this method chooses to parent.
			return bestParent;
		}

		//
		// The active window is modal.  We must make it the non-modal dialog's parent to
		// prevent blocking the non-modal.
		//
		return dialog;
	}
Shows the dialog using the given parent window using the optional component for positioning.

<p>
Warning: this method allows user to explicitly pass a parent window and component over which
to be centered. There is no reason to use this method in the standard workflow. This method
exists strictly to handle future unforeseen use cases. Use at your own risk of incorrectly
parenting dialogs.

@param parent the component whose window over which the given dialog will be shown; cannot be
           null
@param dialogComponent the DialogComponentProvider object to be shown in a dialog
@param centeredOnComponent the component over which the dialog will be centered; cannot be
           null
Ghidra/Framework/Docking/src/main/java/docking/DockingWindowManager.java