diff --git a/src/electron/tray.main.ts b/src/electron/tray.main.ts index e34c54b7dac..46b8abc94cb 100644 --- a/src/electron/tray.main.ts +++ b/src/electron/tray.main.ts @@ -132,6 +132,12 @@ export class TrayMain { } } + updateContextMenu() { + if (this.contextMenu != null && this.isLinux()) { + this.tray.setContextMenu(this.contextMenu); + } + } + private hideDock() { app.dock.hide(); } @@ -144,6 +150,10 @@ export class TrayMain { return process.platform === 'darwin'; } + private isLinux() { + return process.platform === 'linux'; + } + private async toggleWindow() { if (this.windowMain.win == null) { if (this.isDarwin()) {