boolean fromSameWindowAs(@NotNull Component component) {
    if (myPopup != null && !myPopup.isDisposed()) {
      Window popupWindow = SwingUtilities.getWindowAncestor(myPopup.getContent());
      return component == popupWindow || SwingUtilities.getWindowAncestor(component) == popupWindow;
    }
    return false;
  }
boolean fromSameWindowAs(@NotNull Component component)