summaryrefslogtreecommitdiff
path: root/gtk/gtkcssimageicontheme.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-04-22 13:49:18 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-04-22 19:22:41 -0400
commit58ca3b05c93909f95b4bf7cda97d4e378e3653db (patch)
treee15cac449ba081a559c6814438a320853d85fc49 /gtk/gtkcssimageicontheme.c
parentfe6ef5256b8a4898da3d6661775d2fc90594ee25 (diff)
downloadgtk+-58ca3b05c93909f95b4bf7cda97d4e378e3653db.tar.gz
css: Compare icon theme serials
When comparing to icon theme image values for equality, take the serial of the icon theme at compute time into account.
Diffstat (limited to 'gtk/gtkcssimageicontheme.c')
-rw-r--r--gtk/gtkcssimageicontheme.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkcssimageicontheme.c b/gtk/gtkcssimageicontheme.c
index 08fd70a61f..03a8a67d52 100644
--- a/gtk/gtkcssimageicontheme.c
+++ b/gtk/gtkcssimageicontheme.c
@@ -153,6 +153,7 @@ gtk_css_image_icon_theme_compute (GtkCssImage *image,
settings = gtk_style_provider_get_settings (provider);
display = _gtk_settings_get_display (settings);
copy->icon_theme = gtk_icon_theme_get_for_display (display);
+ copy->serial = gtk_icon_theme_get_serial (copy->icon_theme);
copy->scale = gtk_style_provider_get_scale (provider);
gtk_icon_theme_lookup_symbolic_colors (style, &copy->color, &copy->success, &copy->warning, &copy->error);
@@ -166,7 +167,9 @@ gtk_css_image_icon_theme_equal (GtkCssImage *image1,
GtkCssImageIconTheme *icon_theme1 = (GtkCssImageIconTheme *) image1;
GtkCssImageIconTheme *icon_theme2 = (GtkCssImageIconTheme *) image2;
- return g_str_equal (icon_theme1->name, icon_theme2->name);
+ return icon_theme1->serial == icon_theme2->serial &&
+ icon_theme1->icon_theme == icon_theme2->icon_theme &&
+ g_str_equal (icon_theme1->name, icon_theme2->name);
}
static void