public static void moveRectangleToFitTheScreen(@NotNull Rectangle aRectangle) {
    if (StartupUiUtil.isWaylandToolkit()) return; // No abs coordinates in Wayland

    int screenX = aRectangle.x + aRectangle.width / 2;
    int screenY = aRectangle.y + aRectangle.height / 2;
    Rectangle screen = getScreenRectangle(screenX, screenY);

    moveToFit(aRectangle, screen, null);
  }
public static void moveRectangleToFitTheScreen(@NotNull Rectangle aRectangle)