public static @Nullable Window findWindowForBalloon(@Nullable Project project) {
    Window frame = WindowManager.getInstance().getFrame(project);
    if (frame == null && project == null) {
      frame = (Window)WelcomeFrame.getInstance();
    }
    if (frame == null && project == null) {
      frame = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
      while (frame instanceof DialogWrapperDialog) {
        DialogWrapper wrapper = ((DialogWrapperDialog)frame).getDialogWrapper();
        if (wrapper == null || !wrapper.isModalProgress()) break;
        frame = frame.getOwner();
      }
    }
    if (frame == null && project == null) {
      frame = WindowManager.getInstance().findVisibleFrame();
    }
    return frame;
  }
public static @Nullable Window findWindowForBalloon(@Nullable Project project)