 onClosed = () ->
   # console.log('closed')
   # derefernece the window.
-  mainWindow = null
+  _mainWindow = null
   return
 
 app.on 'window-all-closed', ->


app.on 'activate', ->
  # console.log('activate')
  return if mainWindow
  getWindowBounds (bound) ->
    mainWindow = createMainWindow(bound)
  return

app.on 'ready', ->
  # console.log('ready')
  Menu.setApplicationMenu(Menu.buildFromTemplate(template))
  getWindowBounds (bound) ->
    mainWindow = createMainWindow(bound)
  return

app.on 'login', (event, webContents, request, authInfo, callback) ->

]

exports.openDevTools = () ->
  if _mainWindow?
    _mainWindow.webContents.openDevTools()

###*
 @callback onInputEndListener
