summaryrefslogtreecommitdiffhomepage
path: root/gui/src/main
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2022-03-02 11:07:20 +0100
committerOskar Nyberg <oskar@mullvad.net>2022-03-02 11:38:38 +0100
commita3571eed7ee89e33803e5e78f9bd59b6b09ec89b (patch)
treee1b283092fc394c6526e1b6247098bcd793e4f05 /gui/src/main
parentd9b31cef915e1eabef23c3677d5c142458edee73 (diff)
downloadmullvadvpn-a3571eed7ee89e33803e5e78f9bd59b6b09ec89b.tar.xz
mullvadvpn-a3571eed7ee89e33803e5e78f9bd59b6b09ec89b.zip
Propagate new WindowController to TrayIconController
Diffstat (limited to 'gui/src/main')
-rw-r--r--gui/src/main/index.ts1
-rw-r--r--gui/src/main/tray-icon-controller.ts4
2 files changed, 5 insertions, 0 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index bb84d520fe..8cebf9511b 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -594,6 +594,7 @@ class ApplicationMain {
this.installWindowCloseHandler(this.windowController);
this.installTrayClickHandlers();
+ this.trayIconController?.setWindowController(this.windowController);
const filePath = path.resolve(path.join(__dirname, '../renderer/index.html'));
try {
diff --git a/gui/src/main/tray-icon-controller.ts b/gui/src/main/tray-icon-controller.ts
index 9890eba8ff..f1028bd11c 100644
--- a/gui/src/main/tray-icon-controller.ts
+++ b/gui/src/main/tray-icon-controller.ts
@@ -45,6 +45,10 @@ export default class TrayIconController {
}
}
+ public setWindowController(windowController: WindowController) {
+ this.windowController = windowController;
+ }
+
get iconType(): TrayIconType {
return this.iconTypeValue;
}