Call atom.show() from a setTimeout()

The window was previously flashing white if atom.show() was called
directly after window.startup()

Wrapping the call in a setTimeout with a zero delay seems to prevent
the white flash and the perceived amount of time to display the contents
appears to be the same.
This commit is contained in:
Kevin Sawicki
2013-04-19 10:11:19 -07:00
parent 36768251f8
commit 76484acb21

View File

@@ -5,5 +5,5 @@ require 'window'
window.setUpEnvironment()
window.startup()
atom.show()
setTimeout((-> atom.show()), 0)
console.log "Load time: #{new Date().getTime() - date}"