Sometimes an application has other windows open, like the open
panel. Even when these are closed they seem to live on in the
application's window array. We now ignore those windows when trying
to terminate the app.
Closes#534
The first call to terminate is canceled so that every window can be
closed. On AtomCefClient the OnBeforeClose method is called when a
browser is finished closing. Once all windows have finished closing, AtomCefClient calls terminate again, which will terminate the
application.
Closes#527
Previously Atom would crash if a path was opened when there
was already a window open that did not have a path, such as
the specs window.
Now window controllers without a path are skipped during the
checks to activate an existing window for an opened path.
Previously CefShutdown() was called after closing the windows
which would prevent them from running their beforeunload callbacks
and saving state properly when cmd-Q the application.
Now the number of open browsers is tracked and the message loop
is quit and the windows are autoreleased only after the browser
is ready to be closed.
Closes#493
This still allows atom to open its own source when
run from Xcode but will now use the current working
directory when launched from the command line with
no path argument.
Closes#139
Previously if Atom was opened to an already opened
path but that window was hidden then a new window
would be opened when instead the existing window
should be unhidden.
This is called after openFiles and so the default path
will open be opened if other explicit files were not
opened such as by dropping onto the dock icon
This allows us to use Atom to edit Atom, even when changes will break Atom on reload. It does this by ensuring the editor only uses code included with the bundle, but it allows benchmarks and specs to use code located in the path specified by --resource-path.