Function Window.setWindowState

change window state, position, or size; returns true if successful, false if not supported by platform

bool setWindowState(
  WindowState newState,
  bool activate = false,
  Rect newWindowRect = RECT_VALUE_IS_NOT_SET
);