/**
 * Show or hide main window
 * @return {BrowserWindow} appWindow
 */
export default (appWindow) => {
  if (appWindow.isVisible()) {
    appWindow.hide()
  } else {
    appWindow.show()
    appWindow.focus()
  }
}

import { app } from 'electron'

/**
 * Show or hide main window
 * @return {BrowserWindow} appWindow
 */
export default (appWindow) => {
  if (appWindow.isVisible()) {
    appWindow.hide()
    app.hide()
  } else {
    appWindow.show()
    appWindow.focus()
  }
}

Set focus back to previous app when Cerebro window is hidden
Set focus back to previous app when Cerebro window is hidden
