GNOME Bugzilla – Bug 790200
The main window has no icon under Mate desktop
Last modified: 2018-01-06 13:20:15 UTC
Created attachment 363383 [details] screenshot under mate desktop Environment: Fedora25 with Mate desktop Steps: 1. Boot into Mate desktop 2. Launch gnome-photos found that the icon at the upper left corner was shown as a red circle button, and the icon in the task bar was also missing. (see the screenshot) Related bug in gnome-todo: - https://bugzilla.gnome.org/show_bug.cgi?id=782268#c6
Created attachment 363384 [details] [review] photos-application-set-window-icon.patch I have tested this patch in my system via Flatpak+Builder and the icons are shown correctly.
Created attachment 363385 [details] screenshot after applying the patch
Review of attachment 363384 [details] [review]: Thanks for the patch. I'll wait for Debarshi to just take a look and move forward. ::: src/photos-application.c @@ +1860,3 @@ icon_theme = gtk_icon_theme_get_default (); gtk_icon_theme_add_resource_path (icon_theme, "/org/gnome/Photos/icons"); + gtk_window_set_default_icon_name ("org.gnome.Photos"); ++
Two quick questions: (a) What happens in gnome-shell's classic mode? (b) What about other applications (say, gnome-clocks, gnome-documents, nautilus, totem, etc.) running under MATE?
(In reply to Debarshi Ray from comment #4) > Two quick questions: > > (a) What happens in gnome-shell's classic mode? It works, the Photos icon is present. > (b) What about other applications (say, gnome-clocks, gnome-documents, > nautilus, totem, etc.) running under MATE? Some of them do call gtk_window_set_default_icon_name.
Review of attachment 363384 [details] [review]: We discussed this in #gtk+ on GIMPNet. Long story short, this is needed only for X sessions run by some non-GNOME environments. GNOME on X works without it, and it has no effect on Wayland. Given that we are moving towards Wayland, it makes more sense to update MATE instead of asking relatively young GNOME applications to carry X-specific settings for non-GNOME environments. A lengthier explanation follows: ::: src/photos-application.c @@ +1860,3 @@ icon_theme = gtk_icon_theme_get_default (); gtk_icon_theme_add_resource_path (icon_theme, "/org/gnome/Photos/icons"); + gtk_window_set_default_icon_name ("org.gnome.Photos"); What this does, is set the _NET_WM_ICON of the window. Try throwing xprop at it under X. GNOME Shell picks up the application icon from the Icon key in the desktop file, which is looked up using the application ID or the WM_CLASS. Failing that, on X, it uses _NET_WM_ICON. Note: * gnome-photos' application ID does match the desktop file, and even though its WM_CLASS didn't, that's enough for GNOME Shell to locate the icon. I have now fixed WM_CLASS too. * Coincidentally, the Icon matches the desktop file name, but that's not important. Sadly, _NET_WM_ICON is a X concept without any Wayland equivalent. Even though a lot of applications do set _NET_WM_ICON, I don't want to add yet another little setting to the startup for the sake of non-GNOME X sessions. Most applications which set _NET_WM_ICON do so for historical reasons when X was the only display server around, but that's not the case anymore. These days, as a general rule, we should be moving away from X-specific concepts as opposed to adding more of them, especially when things can work without them. Note: * _NET_WM_ICON is not needed for GNOME's X session either. * This is *GNOME* Photos. It's raison d'etre is to provide a first class experience on GNOME. It already doesn't work out of the box on environments that disable Tracker, don't offer GNOME Online Accounts or gnome-settings-daemon, etc.. So, unless there is a significant influx of users or development resources from non-GNOME environments, such compatibility crutches are a bit futile. This change can have interesting side effects if someday we change the icon in the desktop file. Most people won't realize that the _NET_WM_ICON needs to updated in tandem, because an overwhelming percentage of users and contributors of the app use GNOME. I'd suggest that MATE's gnome-panel and metacity forks be updated to not use _NET_WM_ICON.
The desktop file has "OnlyShowIn=GNOME;", which makes me wonder how you got it to show up in MATE.
*** This bug has been marked as a duplicate of bug 787029 ***