Commit fbeb26bad2f96cc85202a94623d26c0c6539b0be
Merge pull request #278 from ssbc/fix-activate-mac
fix reopening main window on macOSMatt McKegg authored on 11/8/2018, 8:01:35 AM
GitHub committed on 11/8/2018, 8:01:35 AM
Parent: 1c2926f12ff8e365e1d469f23180b50d50b9c749
Parent: a09a8ffcae7fccc632b9ffa98d0d1f30d8f3bd53
Files changed
index.js | changed |
index.js | |||
---|---|---|---|
@@ -20,8 +20,15 @@ | |||
20 | 20 … | electron.app.on('before-quit', function () { | |
21 | 21 … | quitting = true | |
22 | 22 … | }) | |
23 | 23 … | ||
24 … | + electron.app.on('activate', function (e) { | ||
25 … | + // reopen the app when dock icon clicked on macOS | ||
26 … | + if (windows.main) { | ||
27 … | + windows.main.show() | ||
28 … | + } | ||
29 … | + }) | ||
30 … | + | ||
24 | 31 … | // allow inspecting of background process | |
25 | 32 … | electron.ipcMain.on('open-background-devtools', function (ev, config) { | |
26 | 33 … | if (windows.background) { | |
27 | 34 … | windows.background.webContents.openDevTools({ detach: true }) |
Built with git-ssb-web