diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-08-06 14:04:48 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-08-07 08:38:09 -0300 |
| commit | ae55698d4d6ed5c002b8a195663d2fa216c8d1ca (patch) | |
| tree | a64ea471ef6840d02f184b31445bb4f067f4e92f /app | |
| parent | 2a2e9270e2f7f61adaafe33a672a47f4553fd797 (diff) | |
| download | mullvadvpn-ae55698d4d6ed5c002b8a195663d2fa216c8d1ca.tar.xz mullvadvpn-ae55698d4d6ed5c002b8a195663d2fa216c8d1ca.zip | |
Show window if launched while running
Diffstat (limited to 'app')
| -rw-r--r-- | app/main.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/main.js b/app/main.js index 6bf18490a3..e9b7412854 100644 --- a/app/main.js +++ b/app/main.js @@ -32,6 +32,7 @@ const ApplicationMain = { log.info(`Running version ${app.getVersion()}`); + app.on('activate', () => this._onActivate()); app.on('ready', () => this._onReady()); app.on('window-all-closed', () => app.quit()); app.on('before-quit', () => this._onBeforeQuit()); @@ -121,6 +122,13 @@ const ApplicationMain = { } }, + _onActivate() { + const windowController = this._windowController; + if (windowController) { + windowController.show(); + } + }, + _onBeforeQuit() { this._shouldQuit = true; return true; |
