     y: y
     width: width
     height: height
+    title: 'poi'
+    icon: poiIconPath
     resizable: config.get 'poi.content.resizeable', true
     alwaysOnTop: config.get 'poi.content.alwaysOnTop', false
     titleBarStyle: 'hidden'
     webPreferences:
-      webSecurity: false
       plugins: true
       enableLargerThanScreen: true
   # Default menu
   mainWindow.reloadArea = 'kan-game webview'
-  mainWindow.setResizable(config.get 'poi.content.resizeable', true)
-  if process.platform == 'darwin'
-    if /electron$/i.test process.argv[0]
-      icon = nativeImage.createFromPath("#{ROOT}/assets/icons/poi.png")
-      app.dock?.setIcon? icon
-  else
-    mainWindow.setMenu null
-
+  mainWindow.setMenu null if process.platform isnt 'darwin'
   mainWindow.loadURL "file://#{__dirname}/index.html"
   if config.get 'poi.window.isMaximized', false
     mainWindow.maximize()


  # Tray icon
  if process.platform == 'win32'
    global.appIcon = appIcon = new Tray(path.join(ROOT, 'assets', 'icons', 'poi.ico'))
    appIcon.on 'click', ->
      win = mainWindow
      if win.isMinimized() then win.restore() else win.show()

{app, BrowserWindow, ipcMain, Tray} = require 'electron'
path = require 'path-extra'
fs = require 'fs-extra'

