[Bug]: Native Wayland window class #2687

Closed
opened 2024-12-07 23:11:01 +00:00 by Damglador · 3 comments
Damglador commented 2024-12-07 23:11:01 +00:00 (Migrated from github.com)

Preflight Checklist

  • I use the latest version of YouTube Music (Application).
  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.
  • I understand that th-ch/youtube-music has NO affiliation with Google or YouTube

YouTube Music (Application) Version

3.6.2-1

Checklists

What operating system are you using?

Other Linux

Operating System Version

Arch Linux

What CPU architecture are you using?

x64

Last Known Working YouTube Music (Application) version

No response

Reproduction steps

  1. Enter Wayland session
  2. youtube-music --ozone-platform=wayland
  3. In alt+tab menu app will have a stock Wayland icon, possibly in the title bar as well, if system title bar is enabled

Expected Behavior

It should have icon of Youtube Music

Actual Behavior

It has Wayland icon

Enabled plugins

  1. Експоненційна гучність
  2. Компактна бічна панель
  3. Навігація
  4. Обхід вікових обмежень
  5. Ad blocker
  6. Discord integration

Additional Information

The app's window class is "YouTube Music", but the desktop file, icon and binary are youtube-music. Because Wayland grabs an icon from a .desktop file with a name that matches the name of a window class, it tries to find .desktop file "YouTube Music", which by default is missing (at least in AUR version).

Possible solutions:

  1. Rename .desktop file to "YouTube Music.desktop"
  2. Change window class to "youtube-music"
### Preflight Checklist - [X] I use the latest version of YouTube Music (Application). - [X] I have searched the [issue tracker](https://github.com/th-ch/youtube-music/issues) for a bug report that matches the one I want to file, without success. - [X] I understand that **th-ch/youtube-music has NO affiliation with Google or YouTube** ### YouTube Music (Application) Version 3.6.2-1 ### Checklists - [ ] I use the portable version of the YouTube Music Application. - [ ] I can reproduce this issue in the [official version of (WEB) YTM](https://music.youtube.com). ### What operating system are you using? Other Linux ### Operating System Version Arch Linux ### What CPU architecture are you using? x64 ### Last Known Working YouTube Music (Application) version _No response_ ### Reproduction steps 1. Enter Wayland session 2. `youtube-music --ozone-platform=wayland` 3. In alt+tab menu app will have a stock Wayland icon, possibly in the title bar as well, if system title bar is enabled ### Expected Behavior It should have icon of Youtube Music ### Actual Behavior It has Wayland icon ### Enabled plugins 1. Експоненційна гучність 2. Компактна бічна панель 3. Навігація 4. Обхід вікових обмежень 5. Ad blocker 6. Discord integration ### Additional Information The app's window class is "YouTube Music", but the desktop file, icon and binary are youtube-music. Because Wayland grabs an icon from a .desktop file with a name that matches the name of a window class, it tries to find .desktop file "YouTube Music", which by default is missing (at least in AUR version). Possible solutions: 1. Rename .desktop file to "YouTube Music.desktop" 2. Change window class to "youtube-music"
ar-lex commented 2024-12-22 16:35:41 +00:00 (Migrated from github.com)

I think there are different but connected issues:

  1. electron-buidler generates application icon filename from build.appId but with underscores instead hyphens, presumably to correspond to reverse domain name notation that is preferred in Freedesktop standard and also used in Flatpak. There is no way to override generated icon filename
  2. X11 window class is set to build.appId which is defined with hyphens
  3. Wayland window class is set to productName

Because of that:

  1. X11 application has correct application switcher icons but generic window title icon, no issues with pinning and grouping on the panel
  2. Wayland application has both generic application switcher and window title icon, and also has issues with grouping and pinning

To solve these issues the application must have the same X11 and Wayland window classes, icon and desktop file name set to the same value in reverse domain name notation. Also StartupWMClass must be defined in desktop file for correct grouping and pinning in pure Wayland mode.

I think there are different but connected issues: 1. electron-buidler generates application icon filename from `build.appId` but with underscores instead hyphens, presumably to correspond to reverse domain name notation that is preferred in Freedesktop standard and also used in Flatpak. There is no way to override generated icon filename 2. X11 window class is set to `build.appId` which is defined with hyphens 3. Wayland window class is set to `productName` Because of that: 1. X11 application has correct application switcher icons but generic window title icon, no issues with pinning and grouping on the panel 2. Wayland application has both generic application switcher and window title icon, and also has issues with grouping and pinning To solve these issues the application must have the same X11 and Wayland window classes, icon and desktop file name set to the same value in reverse domain name notation. Also `StartupWMClass` must be defined in desktop file for correct grouping and pinning in pure Wayland mode.
Damglador commented 2024-12-26 23:41:02 +00:00 (Migrated from github.com)

Now it's even worse, icon in panel is also gone
image

Now it's even worse, icon in panel is also gone ![image](https://github.com/user-attachments/assets/30a19569-94e2-46cb-8321-5c21ef9eec6f)
Damglador commented 2024-12-26 23:49:45 +00:00 (Migrated from github.com)

Though that's an issue with packaging, so here I go to AUR

Though that's an issue with packaging, so here I go to AUR
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: YTMD/youtube-music#2687
No description provided.