From b3009f13875df5f1c6b04ea7bea522ca87164243 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Sun, 28 Aug 2016 06:17:41 -0600 Subject: [PATCH] Focus application on all code paths that open windows in main process MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I think this should take the application out of “app nap” on macOS, leading to better responsiveness when opening paths from the CLI. --- src/main-process/atom-application.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main-process/atom-application.coffee b/src/main-process/atom-application.coffee index 0fd7f5630..541f70990 100644 --- a/src/main-process/atom-application.coffee +++ b/src/main-process/atom-application.coffee @@ -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