mirror of
https://github.com/atom/atom.git
synced 2026-01-27 15:58:00 -05:00
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 <maxbrunsfeld@github.com>
This commit is contained in:
committed by
Max Brunsfeld
parent
0b7e141921
commit
f14587d3cc
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user