From 8223c9fbfda40dc98a46e5e08deccc77868c765a Mon Sep 17 00:00:00 2001 From: Chen Yichi Date: Thu, 8 Jan 2026 17:08:51 +0800 Subject: [PATCH] fix(Tray): set X11 window class and name to cherry-studio (#12348) fix: set X11 window class and name to cherry-studio Set window class and name for Linux X11 to ensure system tray and window manager identify the app correctly instead of using default 'electron' identifier. --- src/main/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/index.ts b/src/main/index.ts index 536485a490..aab674ba50 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -75,6 +75,15 @@ if (isLinux && process.env.XDG_SESSION_TYPE === 'wayland') { app.commandLine.appendSwitch('enable-features', 'GlobalShortcutsPortal') } +/** + * Set window class and name for X11 + * This ensures the system tray and window manager identify the app correctly + */ +if (isLinux) { + app.commandLine.appendSwitch('class', 'cherry-studio') + app.commandLine.appendSwitch('name', 'cherry-studio') +} + // DocumentPolicyIncludeJSCallStacksInCrashReports: Enable features for unresponsive renderer js call stacks // EarlyEstablishGpuChannel,EstablishGpuChannelAsync: Enable features for early establish gpu channel // speed up the startup time