From 262e42a2bf85571a2797fa219ec981db55e16e17 Mon Sep 17 00:00:00 2001 From: Andrew Simachev Date: Tue, 9 Mar 2021 10:47:18 +0300 Subject: [PATCH] CU-ez1dvf: Fix electron window activation for MacOs dock --- electron.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/electron.js b/electron.js index 516f32c54e..fa7246937c 100644 --- a/electron.js +++ b/electron.js @@ -662,6 +662,15 @@ app.on('before-quit', (e) => { exit(false); }); +app.on('activate', function () { + // On OS X it's common to re-create a window in the app when the + // dock icon is clicked and there are no other windows open. + if (win === null) { + createWindow(); + }; + win.show(); +}); + function send () { if (win) { win.webContents.send.apply(win.webContents, arguments);