summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/main.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/main.js b/app/main.js
index 5b242a644c..0a7fb6172a 100644
--- a/app/main.js
+++ b/app/main.js
@@ -150,10 +150,7 @@ const ApplicationMain = {
this._installMacOsMenubarAppWindowHandlers(tray, windowController);
break;
default:
- tray.on('click', () => {
- windowController.toggle();
- });
- windowController.show();
+ this._installGenericMenubarAppWindowHandlers(tray, windowController);
break;
}
@@ -457,6 +454,13 @@ const ApplicationMain = {
window.on('hide', () => macEventMonitor.stop());
tray.on('click', () => windowController.toggle());
},
+
+ _installGenericMenubarAppWindowHandlers(tray: Tray, windowController: WindowController) {
+ tray.on('click', () => {
+ windowController.toggle();
+ });
+ windowController.show();
+ },
};
ApplicationMain.run();