diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c index 850c0d697..2c9319980 100644 --- a/src/st/st-texture-cache.c +++ b/src/st/st-texture-cache.c @@ -1619,3 +1619,18 @@ st_texture_cache_rescan_icon_theme (StTextureCache *cache) return gtk_icon_theme_rescan_if_needed (priv->icon_theme); } + + +/** + * st_texture_cache_invalidate: + * @cache: a #StTextureCache + * + * Invalidates the texture cache, and evicts all icons. + */ +void +st_texture_cache_invalidate (StTextureCache *cache) +{ + g_return_if_fail (ST_IS_TEXTURE_CACHE (cache)); + + st_texture_cache_evict_icons (cache); +} diff --git a/src/st/st-texture-cache.h b/src/st/st-texture-cache.h index a99316da8..031087d87 100644 --- a/src/st/st-texture-cache.h +++ b/src/st/st-texture-cache.h @@ -115,4 +115,6 @@ CoglTexture * st_texture_cache_load (StTextureCache *cache, gboolean st_texture_cache_rescan_icon_theme (StTextureCache *cache); +void st_texture_cache_invalidate (StTextureCache *cache); + #endif /* __ST_TEXTURE_CACHE_H__ */ diff --git a/src/st/st-theme-context.c b/src/st/st-theme-context.c index de112aa49..b21d5de96 100644 --- a/src/st/st-theme-context.c +++ b/src/st/st-theme-context.c @@ -176,7 +176,11 @@ st_theme_context_set_property (GObject *object, int scale_factor = g_value_get_int (value); if (scale_factor != context->scale_factor) { + StTextureCache *cache = st_texture_cache_get_default (); + context->scale_factor = scale_factor; + + st_texture_cache_invalidate (cache); st_theme_context_changed (context); }