{"action":"closed","issue":{"url":"https://api.github.com/repos/electron/electron/issues/3839","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/3839/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/3839/comments","events_url":"https://api.github.com/repos/electron/electron/issues/3839/events","html_url":"https://github.com/electron/electron/issues/3839","id":122625317,"number":3839,"title":"Change window icon dynamically","user":{"login":"sapioit","id":3173159,"avatar_url":"https://avatars.githubusercontent.com/u/3173159?v=3","gravatar_id":"","url":"https://api.github.com/users/sapioit","html_url":"https://github.com/sapioit","followers_url":"https://api.github.com/users/sapioit/followers","following_url":"https://api.github.com/users/sapioit/following{/other_user}","gists_url":"https://api.github.com/users/sapioit/gists{/gist_id}","starred_url":"https://api.github.com/users/sapioit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapioit/subscriptions","organizations_url":"https://api.github.com/users/sapioit/orgs","repos_url":"https://api.github.com/users/sapioit/repos","events_url":"https://api.github.com/users/sapioit/events{/privacy}","received_events_url":"https://api.github.com/users/sapioit/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/electron/electron/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-12-16T23:14:45Z","updated_at":"2016-05-20T14:30:00Z","closed_at":"2016-05-20T14:30:00Z","body":"Hello,\r\n\r\nI recently tried to change the icon of [my app](https://github.com/sapioit/zFacebook), and noticed is a real headache. So, I came here requesting BrowserWindow to have a method of having it's icon changed, at will, without changing anything about the executable files. I know there are ways if doing that natively, on Windows and Linux, but such thing does not exists implemented into the app itself.\r\n\r\nI'd like to have the icon in cause be changed to a different one, when the state of the app changes. For example, when it's done doing something and waits for user input, I'd like to have it chance it's icon, yet I see no way to do so. I tried the following, out of which none worked, so far:\r\n\r\nmain.js\r\n```node\r\n var app = require('app');\r\n var BrowserWindow = require('browser-window');\r\n require('crash-reporter').start();\r\n\r\n var mainWindow = null;\r\n\r\n app.on('window-all-closed', function() {\r\n  if (process.platform != 'darwin')\r\n   app.quit();\r\n });\r\n\r\n app.on('ready', function() {\r\n  mainWindow = new BrowserWindow({\r\n   width: 700,\r\n   height: 850,\r\n   resizable: true,\r\n   title: \"zFacebook\",\r\n   icon: \"/zFacebook.icns\",\r\n   icon: \"/zFacebook.ico\",\r\n   icon: \"/zFacebook.png\"\r\n  });\r\n  mainWindow.setOverlayIcon(\r\n   __dirname + \"/zFacebook.png\",\r\n   \"Test?\");\r\n  mainWindow.setTitle(\"zFacebook\");\r\n  mainWindow.loadUrl('file://' + __dirname + '/index.html');\r\n  mainWindow.focus();\r\n  mainWindow.on('closed', function() {\r\n   mainWindow = null;\r\n  });\r\n  //mainWindow.toggleDevTools();\r\n });\r\n```\r\nindex.html\r\n```html\r\n<!DOCTYPE html>\r\n<html>\r\n <head>\r\n  <title>zFacebook</title>\r\n  <link rel=\"icon\" href=\"/zFacebook.incs\">\r\n  <link rel=\"icon\" href=\"/zFacebook.ico\">\r\n  <link rel=\"icon\" href=\"/zFacebook.png\">\r\n </head>\r\n <body style=\"overflow:hidden;\">\r\n  <webview id=\"webview\" src=\"http://messenger.com\" preload=\"\" style=\"position:absolute;width:100%;height:100%;\"></webview>\r\n  <script>\r\n   // need to have a script tag make webview work even if you don't plan to use it...\r\n  </script>\r\n </body>\r\n</html>\r\n```\r\nHelp?"}}
{"actor":{"display_login":"zcbenz"}}