From d7b5f0a26b15472b37aef2248dea51a2aa6d4916 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Tue, 15 Dec 2020 21:26:51 +0100 Subject: [PATCH] Avoid destroying the tray icon in linux (#227) --- src/electron/tray.main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/electron/tray.main.ts b/src/electron/tray.main.ts index bed712f5aa7..e34c54b7dac 100644 --- a/src/electron/tray.main.ts +++ b/src/electron/tray.main.ts @@ -86,7 +86,9 @@ export class TrayMain { } removeTray(showWindow = true) { - if (this.tray != null) { + // Due to https://github.com/electron/electron/issues/17622 + // we cannot destroy the tray icon on linux. + if (this.tray != null && process.platform !== 'linux') { this.tray.destroy(); this.tray = null; }