Skip to content

Commit 8de8841

Browse files
committed
refactor(desktop): Drop the unused Linux --class switch
Since Electron 43 the main window's X11 WM_CLASS and Wayland app id both come from setDesktopName("com.t3tools.T3Code.desktop"), so appending --class=t3code (t3code-dev in development) no longer sets the window class. Remove the switch and the linuxWmClass value that only fed it.
1 parent 29f33af commit 8de8841

4 files changed

Lines changed: 0 additions & 6 deletions

File tree

‎apps/desktop/src/app/DesktopEarlyElectronStartup.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ type EarlyLinuxElectronOptionsInput = EarlyDesktopSettingsInput;
2626

2727
export interface EarlyLinuxElectronOptions {
2828
readonly isDevelopment: boolean;
29-
readonly linuxWmClass: string;
3029
readonly linuxDesktopEntryName: string;
3130
readonly passwordStore: LinuxPasswordStoreSwitch | null;
3231
}
@@ -146,7 +145,6 @@ export function resolveEarlyLinuxElectronOptions(
146145
const isDevelopment = isDevelopmentEnvironment(input.env);
147146
return {
148147
isDevelopment,
149-
linuxWmClass: isDevelopment ? "t3code-dev" : "t3code",
150148
linuxDesktopEntryName: resolveLinuxDesktopEntryName(isDevelopment),
151149
passwordStore: resolveLinuxPasswordStoreSwitch({
152150
preference,

‎apps/desktop/src/app/DesktopEnvironment.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ export class DesktopEnvironment extends Context.Service<
7575
readonly displayName: string;
7676
readonly appUserModelId: string;
7777
readonly linuxDesktopEntryName: string;
78-
readonly linuxWmClass: string;
7978
readonly linuxApplicationsDir: string;
8079
readonly desktopLauncherPath: Option.Option<string>;
8180
readonly appImagePath: Option.Option<string>;
@@ -232,7 +231,6 @@ const make = Effect.fn("desktop.environment.make")(function* (
232231
isDevelopment ? "com.t3tools.t3code.dev" : "com.t3tools.t3code",
233232
),
234233
linuxDesktopEntryName: resolveLinuxDesktopEntryName(isDevelopment),
235-
linuxWmClass: isDevelopment ? "t3code-dev" : "t3code",
236234
linuxApplicationsDir,
237235
desktopLauncherPath: config.desktopLauncherPath,
238236
appImagePath: config.appImagePath,

‎apps/desktop/src/app/DesktopLinuxUrlHandler.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const makeEnvironment = (path: Path.Path, overrides: Record<string, unknown> = {
2929
isDevelopment: false,
3030
displayName: "T3 Code (Alpha)",
3131
linuxDesktopEntryName: "com.t3tools.T3Code.desktop",
32-
linuxWmClass: "t3code",
3332
linuxApplicationsDir: "/home/alice/.local/share/applications",
3433
desktopLauncherPath: Option.none(),
3534
appImagePath: Option.some("/home/alice/Applications/T3-Code.AppImage"),

‎apps/desktop/src/app/DesktopPreReadyPlatform.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ export const make = Effect.gen(function* () {
121121
} catch {}
122122
// Chromium caches portal identity; set it before any asynchronous initialization.
123123
Electron.app.setDesktopName(linux.linuxDesktopEntryName);
124-
Electron.app.commandLine.appendSwitch("class", linux.linuxWmClass);
125124
if (linux.passwordStore !== null && linuxPasswordStoreCommandLine === null) {
126125
Electron.app.commandLine.appendSwitch("password-store", linux.passwordStore);
127126
}

0 commit comments

Comments
 (0)