From 75a52968d0b1c332b0f578c1c2a381d4367b9d90 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 18 Nov 2015 10:55:40 -0800 Subject: [PATCH] Avoid using deprecated 'activate-with-no-open-windows' event The current shim for that event has a missing event argument --- src/browser/atom-application.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index b68ee2c73..9dc73652e 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -227,9 +227,10 @@ class AtomApplication event.preventDefault() @openUrl({urlToOpen, @devMode, @safeMode}) - app.on 'activate-with-no-open-windows', (event) => - event.preventDefault() - @emit('application:new-window') + app.on 'activate', (event, hasVisibleWindows) => + unless hasVisibleWindows + event.preventDefault() + @emit('application:new-window') # A request from the associated render process to open a new render process. ipc.on 'open', (event, options) =>