OS X: Prevent white flash on window open

We got the window to run less JS but now it’s shown by the main process
too soon! This fixes that with a setTimeout.

Perhaps when this issue is fixed
(https://github.com/atom/electron/issues/861) we can remove the timeout.
This commit is contained in:
Feross Aboukhadijeh
2016-03-27 00:27:28 -07:00
parent 6465c23127
commit 589880f1e3
2 changed files with 4 additions and 5 deletions

View File

@@ -71,10 +71,6 @@ function createMainWindow () {
menu.onToggleFullScreen()
})
win.webContents.on('did-finish-load', function () {
win.show()
})
win.on('blur', menu.onWindowHide)
win.on('focus', menu.onWindowShow)