From f14587d3cc01faed21f34f13d6f8891a830cd8bb Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 22 Sep 2016 15:54:44 -0600 Subject: [PATCH] Use app activate event instead of defunct activate-with-no-open-windows This restores the ability to open a Window by single-clicking the dock icon on macOS. Signed-off-by: Max Brunsfeld --- src/main-process/atom-application.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main-process/atom-application.coffee b/src/main-process/atom-application.coffee index 886f31f7f..42189f299 100644 --- a/src/main-process/atom-application.coffee +++ b/src/main-process/atom-application.coffee @@ -250,9 +250,10 @@ class AtomApplication event.preventDefault() @openUrl({urlToOpen, @devMode, @safeMode}) - @disposable.add ipcHelpers.on app, 'activate-with-no-open-windows', (event) => - event?.preventDefault() - @emit('application:new-window') + @disposable.add ipcHelpers.on app, 'activate', (event, hasVisibleWindows) => + unless hasVisibleWindows + event?.preventDefault() + @emit('application:new-window') @disposable.add ipcHelpers.on ipcMain, 'restart-application', => @restart()