GNOME Bugzilla – Bug 306359
Load menu icons on expose-event, not on map
Last modified: 2020-11-06 20:25:31 UTC
Problem: 1) a .desktop file is installed 2) handle_menu_tree_changed() is called and gnome-panel destroys the menu 3) if a GtkImage receives a map event *before* the icon file is installed, gnome-panel shows an empty icon. Since the map event is emitted only once, gnome-panel will not display the icon file once it is installed. Solution: connect to expose-event rather than to map (patch attached).
Created attachment 47183 [details] [review] the fix
So, I looked into this and here's what we have: * the icons are loaded on the map event * when a theme changes, all icons are unmapped and remapped (see icon_theme_changed() and reload_image_menu_items()) * the fact that a theme changes is a GTK+ matter * right now, GTK+ emits the changed signal for a theme when the mtime of the toplevel theme directory has changed * you probably don't update the mtime of the theme when you install the icon file (this is an issue in a lot of tarballs, iirc) Your patch is not working as it should (when the theme changes, eg). So, I'll try to find another way to fix this, but this is low priority.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years. If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/gnome-panel/-/issues/ Thank you for reporting this issue and we are sorry it could not be fixed.