Alex313031 / Mercury

Firefox fork with compiler optimizations and patches from Librewolf, Waterfox, and GNU IceCat.
https://thorium.rocks/mercury
Mozilla Public License 2.0
1.02k stars 26 forks source link

Wayland Icon Instead of the Mercury Icon #119

Open tylercritchlow opened 5 months ago

tylercritchlow commented 5 months ago

I'm running Wayland on Tuxedo OS, which uses deb packages, and the icon changes from the Mercury icon when it is not launched to the Wayland icon when it is. I tried vanilla Firefox and it doesn't do this.

tylercritchlow commented 5 months ago

Screenshots of the icons: 2024-01-30_18-06 2024-01-30_18-07

tylercritchlow commented 5 months ago

What I found: https://community.kde.org/Guidelines_and_HOWTOs/Wayland_Porting_Notes#Application_Icon

Application Icon On Wayland setWindowIcon() no longer works. This also means that currently is not possible to set a per-window icon >(because the xdg-shell standard doesn't allow it). It is still possible to set the main application icon that will be shown in >task managers and window decorations:

The name of the application icon will be fetched from the .desktop file of the application. The name of the .desktop file must adhere to the reverse domain standard (e.g. org.kde.app.desktop).

Most of the KDE applications are already working fine because KAboutData takes care of all the necessary steps. If for >some reason your application is not using KAboutData, you need to manually call >QGuiApplication::setDesktopFileName().

Alex313031 commented 4 months ago

@tylercritchlow I can't find any examples of this being used in a firefox .desktop file

helpimnotdrowning commented 3 days ago

I've found a workaround for this issue: as mentioned in workaround no.1 in this Bugzilla issue for Firefox Beta/Wayland showing the Wayland icon , adding --name Mercury to the Exec lines in the desktop file will properly group the windows:

- Exec=mercury-browser %u
+ Exec=mercury-browser --name Mercury %u

( repeat for subsequent [Desktop Action*] sections aswell)

turning this: Old, improperly grouped Mercury window with the Wayland icon and lowercase window label

to this: Properly grouped Mercury window after .desktop modification, with the correct Mercury icon and properly-cased window label

helpimnotdrowning commented 3 days ago

nevermind that attempted commit/PR, a much nicer-looking fix was actually featured in #84 , where the StartupWMClass is just set to mercury-default instead of the stock mercury