private static Dialog findParentModalDialog(Component permanentFocusOwner,
			List<Dialog> openModalDialogs) {

		for (Dialog dialog : openModalDialogs) {
			if (SwingUtilities.isDescendingFrom(permanentFocusOwner, dialog)) {
				return dialog;
			}
		}

		return null;
	}
Returns a list of all <code>parent</code>'s descendant modal dialogs.

@param parent the parent for which to find modal dialogs
@return a list of all <code>parent</code>'s descendant modal dialogs.
Ghidra/Framework/Generic/src/main/java/generic/util/WindowUtilities.java