Files
atom/src/window-bootstrap.coffee
Kevin Sawicki 77741b6f3f Set ATOM_HOME as early as possible in render process
Moves it from window-bootstrap.coffee to index.js so it runs before
the coffee cache is registered.

Refs #5412
2015-02-05 12:18:51 -08:00

14 lines
446 B
CoffeeScript

# Like sands through the hourglass, so are the days of our lives.
require './window'
Atom = require './atom'
window.atom = Atom.loadOrCreate('editor')
atom.initialize()
atom.startEditorWindow()
# Workaround for focus getting cleared upon window creation
windowFocused = ->
window.removeEventListener('focus', windowFocused)
setTimeout (-> document.querySelector('atom-workspace').focus()), 0
window.addEventListener('focus', windowFocused)