public static boolean isNativeBoundsEmpty(@NotNull Window window) {
    Object platformWindow = getPlatformWindow(window);
    if (platformWindow != null) {
      try {
        Field boundsField = platformWindow.getClass().getDeclaredField("nativeBounds");
        boundsField.setAccessible(true);
        Object boundsObject = boundsField.get(platformWindow);
        if (boundsObject instanceof Rectangle bounds) {
          return bounds.isEmpty();
        }
      }
      catch (NoSuchFieldException | IllegalAccessException e) {
        LOG.debug(e);
      }
    }
    return false;
  }
public static boolean isNativeBoundsEmpty(@NotNull Window window)