docs(desktop): clarify cross-platform hidden-launch detection

This commit is contained in:
Jannis Braun
2026-04-27 12:54:42 +02:00
parent b0d0ae7be6
commit 962b669cac
+4 -1
View File
@@ -323,7 +323,10 @@ function createWindow(): void {
} }
mainWindow.once('ready-to-show', () => { mainWindow.once('ready-to-show', () => {
// Check if launched minimized (auto-start to tray) // Hidden-launch detection. We pass `args: ['--hidden']` on all three platforms
// (see applyLoginItemSettings), so the argv check is the primary signal. On
// macOS we also honour `wasOpenedAsHidden` as a fallback for the legacy
// openAsHidden path on macOS < 13.
const launchedHidden = const launchedHidden =
process.argv.includes('--hidden') || process.argv.includes('--hidden') ||
(process.platform === 'darwin' && app.getLoginItemSettings().wasOpenedAsHidden); (process.platform === 'darwin' && app.getLoginItemSettings().wasOpenedAsHidden);