Skip to content

Commit 76e80dd

Browse files
authored
fix(desktop): Preserve Linux workspace icons (#5249)
1 parent be4a826 commit 76e80dd

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ describe("DesktopLinuxUrlHandler", () => {
107107
const entry = DesktopLinuxUrlHandler.renderUrlHandlerDesktopEntry({
108108
displayName: "T3 Code (Nightly)",
109109
execTarget: '/home/al ice/Apps/T3 "100%" $HOME\\x.AppImage',
110-
wmClass: "t3code",
111110
scheme: "t3code",
112111
});
113112

@@ -121,7 +120,7 @@ describe("DesktopLinuxUrlHandler", () => {
121120
'Exec="/home/al ice/Apps/T3 \\\\"100%%\\\\" \\\\$HOME\\\\\\\\x.AppImage" %U',
122121
);
123122
assert.include(entry, "NoDisplay=true");
124-
assert.include(entry, "StartupWMClass=t3code");
123+
assert.notInclude(entry, "StartupWMClass=");
125124
assert.include(entry, "MimeType=x-scheme-handler/t3code;");
126125
});
127126

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,11 @@ export function escapeDesktopEntryExecArgument(value: string): string {
6565
return escapeDesktopEntryString(`"${quoted}"`);
6666
}
6767

68+
// The AppImage integration entry owns the window identity and icon. This
69+
// hidden URL-only entry must not compete with it for StartupWMClass matching.
6870
export function renderUrlHandlerDesktopEntry(input: {
6971
readonly displayName: string;
7072
readonly execTarget: string;
71-
readonly wmClass: string;
7273
readonly scheme: string;
7374
}): string {
7475
return [
@@ -79,7 +80,6 @@ export function renderUrlHandlerDesktopEntry(input: {
7980
"Terminal=false",
8081
"NoDisplay=true",
8182
"StartupNotify=false",
82-
`StartupWMClass=${escapeDesktopEntryString(input.wmClass)}`,
8383
`MimeType=x-scheme-handler/${input.scheme};`,
8484
"",
8585
].join("\n");
@@ -113,7 +113,6 @@ export const make = Effect.gen(function* () {
113113
renderUrlHandlerDesktopEntry({
114114
displayName: environment.displayName,
115115
execTarget,
116-
wmClass: environment.linuxWmClass,
117116
scheme,
118117
}),
119118
);

0 commit comments

Comments
 (0)