]> Pileus Git - ~andy/gtk/commit
GtkIconTheme: fix failed assertion when asynchrnously loading emblemed icons
authorGiovanni Campagna <gcampagna@src.gnome.org>
Fri, 1 Mar 2013 22:45:43 +0000 (23:45 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 4 Mar 2013 15:28:00 +0000 (16:28 +0100)
commit0db32f0632ef4675bfcfc9ec201f7af157a48ab0
tree8f7ba3b66425b20f49e6dd9b3aaf04ab0a527631
parent8075181033b50f2d3b8b0a1027e2767db6a14bdf
GtkIconTheme: fix failed assertion when asynchrnously loading emblemed icons

If you tried to lookup an icon that was not emblemed, and then looked up
an emblemed icon with the same base, we would override the iconinfo adding
the emblems inline. Later, when the icon finished rendering, inside
gtk_icon_info_load_icon_finish, we would copy the result from the duplicate
(which did not include the emblem infos), but the icon would still fail the
assertion, because emblems infos are present but emblem_applied is false
(they were not requested in the first place!).
Solve this by avoiding the overwrite on a cached iconinfo, and instead duplicate
the iconinfo before adding the emblems. It is expected that another layer
of caching (such as StTextureCache in gnome-shell) will take care of avoiding
multiple rendering of the same icon+emblem combination.

https://bugzilla.gnome.org/show_bug.cgi?id=694968
gtk/gtkicontheme.c