code: public Window getParentWindow() {
  		if (parentWindow == null) {
  			if ((parentComponent == null) && (getApplicationConfig().windowManager().getActiveWindow() != null)) {
  				parentWindow = getApplicationConfig().windowManager().getActiveWindow().getControl();
  			}
  			else {
  				parentWindow = getWindowForComponent(parentComponent);
  			}
  		}
  		return parentWindow;
  	}
docs: Returns the parent window based on the internal parent Component. Will
  search for a Window in the parent hierarchy if needed (when parent
  Component isn't a Window).
  
  @return the parent window