diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-09-25 11:15:28 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-09-25 11:15:28 +0200 |
| commit | 6e5bbe9648ba543f8c5ec20699f8d9a38d2cda56 (patch) | |
| tree | a10caf64cfe9d21c07bec35cc0560af16fb384a3 /gui/src/main | |
| parent | 49aab4d4ee473315901ea255758783c05d68cb15 (diff) | |
| parent | f8b9216b957d6cfef01088a4f450e3dcadcfccb7 (diff) | |
| download | mullvadvpn-6e5bbe9648ba543f8c5ec20699f8d9a38d2cda56.tar.xz mullvadvpn-6e5bbe9648ba543f8c5ec20699f8d9a38d2cda56.zip | |
Merge branch 'keep-generated-key-up-to-date' into master
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/index.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 9163264a03..8339fb8d7a 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -403,6 +403,8 @@ class ApplicationMain { break; } + this.installGenericFocusHandlers(windowController); + if (this.shouldShowWindowOnStart() || process.env.NODE_ENV === 'development') { windowController.show(); } @@ -1583,6 +1585,15 @@ class ApplicationMain { }); } + private installGenericFocusHandlers(windowController: WindowController) { + windowController.window.on('focus', () => { + IpcMainEventChannel.windowFocus.notify(windowController.webContents, true); + }); + windowController.window.on('blur', () => { + IpcMainEventChannel.windowFocus.notify(windowController.webContents, false); + }); + } + private shouldShowWindowOnStart(): boolean { switch (process.platform) { case 'win32': |
