From 2e1eac02dc6c3a6fb2018e33afdc5f332db5ae2b Mon Sep 17 00:00:00 2001 From: SAPHID Date: Sun, 25 Oct 2026 01:15:15 +0000 Subject: [PATCH] Show login window when Linux tray has no visible icon --- app/main.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/main.js b/app/main.js index 4d39e69..2b92e6c 100644 --- a/app/main.js +++ b/app/main.js @@ -589,11 +589,20 @@ function ensureTray() { const icon = nativeImage.createFromPath(path.join(__dirname, "build", "icon.png")); if (icon.isEmpty()) return false; tray = new Tray(icon); + // Some Linux desktops accept the Tray object but expose no status icon. + // Keep a visible login window rather than hiding the only way back in. + if (process.platform === "linux") { + const bounds = tray.getBounds(); + if (!bounds.width || !bounds.height) { tray.destroy(); tray = null; return false; } + } tray.setToolTip("Frame Control"); tray.on("click", showWindow); updateTrayMenu(); return true; - } catch { return false; } + } catch { + if (tray) { try { tray.destroy(); } catch {} tray = null; } + return false; + } } function updateTrayMenu() {