Closed mfschumann closed 1 month ago
Here we have StartupWMClass, Icon and MOZ_APP_REMOTINGNAME equal to betterbird: https://aur.archlinux.org/cgit/aur.git/tree/betterbird.desktop?h=betterbird-bin#n7 https://aur.archlinux.org/cgit/aur.git/tree/betterbird.desktop?h=betterbird-bin#n11
Now you want to change all three to eu.betterbird.Betterbird.
TB and FF use thunderbird and firefox for StartupWMClass: https://searchfox.org/comm-central/rev/9b4ec479cbe7884631430ed7349416df46d43e2e/mail/installer/linux/app/debian/thunderbird.desktop.in#96,100 https://searchfox.org/mozilla-central/rev/956d571f80fad924a86c3d297850f8efcea30b47/toolkit/mozapps/installer/linux/rpm/mozilla.desktop#15 https://searchfox.org/mozilla-central/rev/956d571f80fad924a86c3d297850f8efcea30b47/toolkit/moz.configure#3114-3120
The icon naming doesn't seem to be consistent between FF and TB: https://searchfox.org/comm-central/search?q=icon%3D&path=desktop&case=false®exp=false
In the end, for non-FlatPak the icon needs to point to the real icon on disk: https://github.com/Betterbird/thunderbird-patches/blob/b17098e2425461ed0641970f36ea53271239f478/install-on-linux/install-betterbird.sh#L89
If we come to the conclusion that the issue is flatpak-specific, I am happy to solve it in the flatpak packaging process. But I don't think this is the case: This KDE Wayland Migration guide suggests that the name of the .desktop file has to adhere to the reverse domain naming scheme for icons to be properly set. So I would expect the icon to be broken in all use cases under KDE Wayland, also when using the AUR package you referred to. I will check tonight and report back.
the name of the .desktop file has to adhere to the reverse domain naming scheme for icons to be properly set.
I'm fine with this part, as TB is doing it: https://searchfox.org/comm-central/rev/9b4ec479cbe7884631430ed7349416df46d43e2e/mail/installer/linux/app/debian/thunderbird.desktop.in#96
What I don't like is setting the StartupWMClass to that bulky reverse domain since I cannot see that being done elsewhere in Mozilla software.
I will check tonight and report back.
Much appreciated.
Here is what I have tested with BB 128.3.1 under Fedora Kinoite (KDE Wayland).
BB variant | MOZ_ENABLE_WAYLAND | name of .desktop file | StartupWMClass | MOZ_APP_REMOTINGNAME | WM class when running | all icons ok? |
---|---|---|---|---|---|---|
flatpak | 0 | eu.betterbird.Betterbird | betterbird | betterbird | betterbird | yes |
flatpak | 1 | eu.betterbird.Betterbird | betterbird | betterbird | betterbird | no |
flatpak | 1 | eu.betterbird.Betterbird | eu.betterbird.Betterbird | betterbird | betterbird | no |
flatpak | 1 | eu.betterbird.Betterbird | eu.betterbird.Betterbird | eu.betterbird.Betterbird | eu.betterbird.Betterbird | yes |
tarball from betterbird.eu | 0 | - | - | betterbird | betterbird | yes |
tarball from betterbird.eu | 1 | - | - | betterbird | betterbird | no |
--> The issue ocurrs as soon as the native Wayland backend of BB is used (by setting MOZ_ENABLE_WAYLAND=1
). It can be fixed by using reverse domain naming everywhere (in line with the KDE documentation).
--> Changing StartupWMClass
inside the .desktop file alone does not help because the WM class of the running application seems to be defined by MOZ_APP_REMOTINGNAME
.
--> The issue ocurrs for the flatpak variant and the version from the tarball downloaded from betterbird.eu.
OK, thanks for testing, I'll take it then. Should we also change 115/mozconfig-Linux?
I would fix it for 128 only because the fix could be breaking for some users that rely on the wm class of the BB window: Some window managers offer to tweak their behavior for individual applications. These are oftentimes identified by their wm class.
So what do we do for the Arch betterbird.desktop file: https://aur.archlinux.org/cgit/aur.git/tree/betterbird.desktop?h=betterbird-bin#n7 https://aur.archlinux.org/cgit/aur.git/tree/betterbird.desktop?h=betterbird-bin#n11
Change it when we go to 128?
In order to fix the icons in KDE wayland for the AUR package several things need to be changed I think:
MOZ_APP_REMOTINGNAME=eu.betterbird.Betterbird
set in the mozconfig (this makes sure the WM class is correct while BB is running; StartupWMClass
seems to apply during startup of BB only).eu.betterbird.Betterbird.desktop
in the PKGBUILD.eu.betterbird.Betterbird.png
in the PKGBUILD.I think synchronizing these changes to the 115->128 upgrade makes sense.
The task switcher in KDE under Wayland does not show a proper Betterbird icon, but a generic Wayland icon. This can be fixed by making the window class equal to the name of the icon, eu.betterbird.Betterbird.
This fix has been confirmed to work for the flatpak: https://github.com/flathub/eu.betterbird.Betterbird/pull/181
Please consider to integrate the fix.