private static DockingWindowManager getInstanceForWindow(Window win) {

		if (win == null) {
			return null;
		}

		for (DockingWindowManager winMgr : instances) {
			if (winMgr.root.getFrame() == win) {
				return winMgr;
			}

			List<DetachedWindowNode> detachedWindows = winMgr.root.getDetachedWindows();
			List<DetachedWindowNode> safeAccessCopy = new LinkedList<>(detachedWindows);
			for (DetachedWindowNode dw : safeAccessCopy) {
				if (dw.getWindow() == win) {
					return winMgr;
				}
			}
		}

		return null;
	}
Get the docking window manager instance which corresponds to the specified window.

@param win the window for which to find its parent docking window manager.
@return docking window manager or null if unknown.
Ghidra/Framework/Docking/src/main/java/docking/DockingWindowManager.java