{"action":"created","issue":{"url":"https://api.github.com/repos/electron/electron/issues/4472","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/4472/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/4472/comments","events_url":"https://api.github.com/repos/electron/electron/issues/4472/events","html_url":"https://github.com/electron/electron/issues/4472","id":133484252,"number":4472,"title":"No shadow on frameless window with inital `show` set to `false`","user":{"login":"davej","id":26971,"avatar_url":"https://avatars.githubusercontent.com/u/26971?v=3","gravatar_id":"","url":"https://api.github.com/users/davej","html_url":"https://github.com/davej","followers_url":"https://api.github.com/users/davej/followers","following_url":"https://api.github.com/users/davej/following{/other_user}","gists_url":"https://api.github.com/users/davej/gists{/gist_id}","starred_url":"https://api.github.com/users/davej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davej/subscriptions","organizations_url":"https://api.github.com/users/davej/orgs","repos_url":"https://api.github.com/users/davej/repos","events_url":"https://api.github.com/users/davej/events{/privacy}","received_events_url":"https://api.github.com/users/davej/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/electron/electron/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/electron/electron/labels/osx","name":"osx","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-02-13T23:55:43Z","updated_at":"2016-06-24T17:42:18Z","closed_at":null,"body":"The following code should display a window after it has finished loading:\r\n\r\n```js\r\nconst prefWindow = new BrowserWindow({\r\n  width: 450,\r\n  'min-width': 450,\r\n  'max-width': 450,\r\n  height: 400,\r\n  'min-height': 400,\r\n  'max-height': 400,\r\n  titleBarStyle: 'hidden',\r\n  transparent: true,\r\n  maximizable: false,\r\n  show: false,\r\n  hasShadow: true\r\n});\r\n\r\nprefWindow.loadURL('prefs.html');\r\n\r\nprefWindow.webContents.on('did-finish-load', () => {\r\n  prefWindow.show();\r\n});\r\n```\r\n\r\nHere's a video of what this window looks like: http://cl.ly/1P0u3z3k3p46 (notice the missing shadow).\r\n\r\nThis can be fixed by simply resizing the window after it has been shown.\r\n\r\n```js\r\nconst prefWindow = new BrowserWindow({\r\n  // ... same as previous example\r\n});\r\n\r\nprefWindow.setSize(0, 0); // HACK\r\nprefWindow.loadURL('prefs.html');\r\n\r\nprefWindow.webContents.on('did-finish-load', () => {\r\n  prefWindow.show();\r\n  prefWindow.setSize(450, 400); // HACK\r\n});\r\n```\r\n\r\nTested on Electron 0.36.7 on OS X 10.10.5."},"comment":{"url":"https://api.github.com/repos/electron/electron/issues/comments/228412097","html_url":"https://github.com/electron/electron/issues/4472#issuecomment-228412097","issue_url":"https://api.github.com/repos/electron/electron/issues/4472","id":228412097,"user":{"login":"davej","id":26971,"avatar_url":"https://avatars.githubusercontent.com/u/26971?v=3","gravatar_id":"","url":"https://api.github.com/users/davej","html_url":"https://github.com/davej","followers_url":"https://api.github.com/users/davej/followers","following_url":"https://api.github.com/users/davej/following{/other_user}","gists_url":"https://api.github.com/users/davej/gists{/gist_id}","starred_url":"https://api.github.com/users/davej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davej/subscriptions","organizations_url":"https://api.github.com/users/davej/orgs","repos_url":"https://api.github.com/users/davej/repos","events_url":"https://api.github.com/users/davej/events{/privacy}","received_events_url":"https://api.github.com/users/davej/received_events","type":"User","site_admin":false},"created_at":"2016-06-24T17:42:18Z","updated_at":"2016-06-24T17:42:18Z","body":"> Ever on OS X 10.11.x?\r\n\r\nI haven't checked that actually. My day-to-day machine is 10.10 but I've got 10.11 in a VM so I'll boot that up and give it a try. I can't do it right now but I'll get around to it over the weekend."}}
{"actor":{"display_login":"davej"}}