From 7e1aea21db2aa3bd7544047518c9a7c3286d8785 Mon Sep 17 00:00:00 2001 From: Alexey Arutyunov Date: Mon, 23 Dec 2024 01:10:57 +0100 Subject: [PATCH] fix: Set correct window class for X11 and Wayland (#2758) --- package.json | 4 ++++ src/index.ts | 3 +++ 2 files changed, 7 insertions(+) diff --git a/package.json b/package.json index 76c0eb36..4925505d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "name": "youtube-music", + "desktopName": "com.github.th_ch.youtube_music", "productName": "YouTube Music", "version": "3.6.2", "description": "YouTube Music Desktop App - including custom plugins", @@ -71,6 +72,9 @@ "linux": { "icon": "assets/generated/icons/png", "category": "AudioVideo", + "desktop": { + "StartupWMClass": "com.github.th_ch.youtube_music" + }, "target": [ { "target": "AppImage", diff --git a/src/index.ts b/src/index.ts index 69f023cf..0d10e369 100644 --- a/src/index.ts +++ b/src/index.ts @@ -131,6 +131,9 @@ if (config.get('options.disableHardwareAcceleration')) { } if (is.linux()) { + // Overrides WM_CLASS for X11 to correspond to icon filename + app.setName("com.github.th_ch.youtube_music"); + // Workaround for issue #2248 if ( process.env.XDG_SESSION_TYPE === 'wayland' ||