summaryrefslogtreecommitdiffhomepage
path: root/gui/src/main
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2020-09-25 11:15:28 +0200
committerOskar Nyberg <oskar@mullvad.net>2020-09-25 11:15:28 +0200
commit6e5bbe9648ba543f8c5ec20699f8d9a38d2cda56 (patch)
treea10caf64cfe9d21c07bec35cc0560af16fb384a3 /gui/src/main
parent49aab4d4ee473315901ea255758783c05d68cb15 (diff)
parentf8b9216b957d6cfef01088a4f450e3dcadcfccb7 (diff)
downloadmullvadvpn-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.ts11
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':