commitWindowState ( layoutInfo ) {
    // don't do anything if we do not want to save the window
    if ( !this.save ) {
      return;
    }

    let winBounds = this.nativeWin.getBounds();

    if ( !winBounds.width ) {
      Console.warn(`Failed to commit window state. Invalid window width: ${winBounds.width}`);
      winBounds.width = 800;
    }

    if ( !winBounds.height ) {
      Console.warn(`Failed to commit window state. Invalid window height ${winBounds.height}`);
      winBounds.height = 600;
    }

    // store windows layout
    let winInfo = _windowLayouts[this.name];
    winInfo = Object.assign( winInfo || {}, winBounds);

    if ( layoutInfo ) {
      winInfo.layout = layoutInfo;
    }

    _windowLayouts[this.name] = winInfo;
  }
/**
   * @method commitWindowState
   * @param {object} layoutInfo
   *
   * Commit the current window state
   */
@method commitWindowState
@param {object} layoutInfo

Commit the current window state
@method commitWindowState @param { object } layoutInfo Commit the current window state
commitWindowState ( layoutInfo ) {
    if ( !this.save ) {
      return;
    }
    let winBounds = this.nativeWin.getBounds();
    if ( !winBounds.width ) {
      Console.warn(`Failed to commit window state. Invalid window width: ${winBounds.width}`);
      winBounds.width = 800;
    }
    if ( !winBounds.height ) {
      Console.warn(`Failed to commit window state. Invalid window height ${winBounds.height}`);
      winBounds.height = 600;
    }
    let winInfo = _windowLayouts[this.name];
    winInfo = Object.assign( winInfo || {}, winBounds);
    if ( layoutInfo ) {
      winInfo.layout = layoutInfo;
    }
    _windowLayouts[this.name] = winInfo;
  }
commitWindowState ( layoutInfo ) { if ( ! this . save ) { return ; } let winBounds = this . nativeWin . getBounds ( ) ; if ( ! winBounds . width ) { Console . warn ( ` ${ winBounds . width } ` ) ; winBounds . width = 800 ; } if ( ! winBounds . height ) { Console . warn ( ` ${ winBounds . height } ` ) ; winBounds . height = 600 ; } let winInfo = _windowLayouts [ this . name ] ; winInfo = Object . assign ( winInfo || { } , winBounds ) ; if ( layoutInfo ) { winInfo . layout = layoutInfo ; } _windowLayouts [ this . name ] = winInfo ; }
@method commitWindowState
 @param {object} layoutInfo
@method commitWindowState @param { object } layoutInfo
// don't do anything if we do not want to save the window // store windows layout