diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-09-24 12:02:08 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-09-25 11:10:37 +0200 |
| commit | f8b9216b957d6cfef01088a4f450e3dcadcfccb7 (patch) | |
| tree | a10caf64cfe9d21c07bec35cc0560af16fb384a3 /gui/src/main | |
| parent | 49aab4d4ee473315901ea255758783c05d68cb15 (diff) | |
| download | mullvadvpn-f8b9216b957d6cfef01088a4f450e3dcadcfccb7.tar.xz mullvadvpn-f8b9216b957d6cfef01088a4f450e3dcadcfccb7.zip | |
Reload duration since key was generated every minute and when the app is opened
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': |
