private static Dialog checkForActiveModalDialog(Dialog theModalest) {
		final KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
		final Window activeWindow = kfm.getActiveWindow();
		if (!(activeWindow instanceof Dialog)) {
			return theModalest;
		}
		Dialog dialog = (Dialog) activeWindow;
		if (dialog.isModal()) {
			return dialog;
		}
		return theModalest;
	}
Returns true if there are one or more modal dialogs displayed in the current JVM.
@return true if there are one or more modal dialogs displayed in the current JVM.
Ghidra/Framework/Generic/src/main/java/generic/util/WindowUtilities.java