Merge pull request #9681 from atom/mb-fix-dock-icon-click

Avoid using deprecated 'activate-with-no-open-windows' event
This commit is contained in:
Nathan Sobo
2015-11-18 10:58:58 -08:00

View File

@@ -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) =>