From a0be3e735f9869d91a4058dcbd40ba7d6dd9a869 Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Thu, 18 Apr 2019 16:16:17 -0400 Subject: [PATCH] Use containsLocations() for AtomApplication window location --- src/main-process/atom-application.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main-process/atom-application.js b/src/main-process/atom-application.js index 7f623aa90..168dfa682 100644 --- a/src/main-process/atom-application.js +++ b/src/main-process/atom-application.js @@ -838,10 +838,12 @@ class AtomApplication extends EventEmitter { }) } - // Returns the {AtomWindow} for the given paths. - windowForPaths (pathsToOpen, devMode) { - return this.getAllWindows().find(window => - window.devMode === devMode && window.containsPaths(pathsToOpen) + // Returns the {AtomWindow} for the given locations. + windowForLocations (locationsToOpen, devMode, safeMode) { + return this.getLastFocusedWindow(window => + window.devMode === devMode && + window.safeMode === safeMode && + window.containsLocations(locationsToOpen) ) }