Focus application on all code paths that open windows in main process

I think this should take the application out of “app nap” on macOS,
leading to better responsiveness when opening paths from the CLI.
This commit is contained in:
Nathan Sobo
2016-08-28 06:17:41 -06:00
parent eff5fa6c0a
commit b3009f1387

View File

@@ -109,6 +109,8 @@ class AtomApplication
@loadState(options) or @openPath(options)
openWithOptions: ({initialPaths, pathsToOpen, executedFrom, urlsToOpen, test, pidToKillWhenClosed, devMode, safeMode, newWindow, logFile, profileStartup, timeout, clearWindowState, addToLastWindow, env}) ->
app.focus()
if test
@runTests({headless: true, devMode, @resourcePath, executedFrom, pathsToOpen, logFile, timeout, env})
else if pathsToOpen.length > 0