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.
This commit is contained in:
Chen Yichi 2026-01-08 17:08:51 +08:00 committed by GitHub
parent 153c1024f6
commit 8223c9fbfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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