Merge pull request #236 from feross/fix-mac-flash
Fix OS X flash of white
This commit is contained in:
@@ -18,9 +18,12 @@ var powerSaveBlockID = 0
|
|||||||
|
|
||||||
function init () {
|
function init () {
|
||||||
ipcMain.on('ipcReady', function (e) {
|
ipcMain.on('ipcReady', function (e) {
|
||||||
console.timeEnd('init')
|
|
||||||
app.ipcReady = true
|
app.ipcReady = true
|
||||||
app.emit('ipcReady')
|
app.emit('ipcReady')
|
||||||
|
setTimeout(function () {
|
||||||
|
windows.main.show()
|
||||||
|
console.timeEnd('init')
|
||||||
|
}, 50)
|
||||||
})
|
})
|
||||||
|
|
||||||
ipcMain.on('showOpenTorrentFile', menu.showOpenTorrentFile)
|
ipcMain.on('showOpenTorrentFile', menu.showOpenTorrentFile)
|
||||||
|
|||||||
@@ -71,10 +71,6 @@ function createMainWindow () {
|
|||||||
menu.onToggleFullScreen()
|
menu.onToggleFullScreen()
|
||||||
})
|
})
|
||||||
|
|
||||||
win.webContents.on('did-finish-load', function () {
|
|
||||||
win.show()
|
|
||||||
})
|
|
||||||
|
|
||||||
win.on('blur', menu.onWindowHide)
|
win.on('blur', menu.onWindowHide)
|
||||||
win.on('focus', menu.onWindowShow)
|
win.on('focus', menu.onWindowShow)
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ function init () {
|
|||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
lazyLoadClient()
|
lazyLoadClient()
|
||||||
lazyLoadCast()
|
lazyLoadCast()
|
||||||
}, 100)
|
}, 750)
|
||||||
|
|
||||||
// The UI is built with virtual-dom, a minimalist library extracted from React
|
// The UI is built with virtual-dom, a minimalist library extracted from React
|
||||||
// The concepts--one way data flow, a pure function that renders state to a
|
// The concepts--one way data flow, a pure function that renders state to a
|
||||||
@@ -76,9 +76,6 @@ function init () {
|
|||||||
// Save state on exit
|
// Save state on exit
|
||||||
window.addEventListener('beforeunload', saveState)
|
window.addEventListener('beforeunload', saveState)
|
||||||
|
|
||||||
// Listen for messages from the main process
|
|
||||||
setupIpc()
|
|
||||||
|
|
||||||
// OS integrations:
|
// OS integrations:
|
||||||
// ...drag and drop a torrent or video file to play or seed
|
// ...drag and drop a torrent or video file to play or seed
|
||||||
dragDrop('body', (files) => dispatch('onOpen', files))
|
dragDrop('body', (files) => dispatch('onOpen', files))
|
||||||
@@ -113,8 +110,12 @@ function init () {
|
|||||||
update()
|
update()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Listen for messages from the main process
|
||||||
|
setupIpc()
|
||||||
|
|
||||||
// Done! Ideally we want to get here <100ms after the user clicks the app
|
// Done! Ideally we want to get here <100ms after the user clicks the app
|
||||||
playInterfaceSound('STARTUP')
|
playInterfaceSound('STARTUP')
|
||||||
|
|
||||||
console.timeEnd('init')
|
console.timeEnd('init')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user