[gnome-shell/gbsneto/icon-grid-dnd: 8/43] st/texture-cache: Monitor GtkIconTheme changes
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/icon-grid-dnd: 8/43] st/texture-cache: Monitor GtkIconTheme changes
- Date: Fri, 2 Aug 2019 19:33:50 +0000 (UTC)
commit 06a7ab871f82d285ee00ffaf53443837189f7a3a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Aug 1 20:54:42 2019 -0300
st/texture-cache: Monitor GtkIconTheme changes
The texture cache, right now, only monitors for
complete theme changes. If the contents of the
icon theme change, however, the texture cache
isn't properly invalidated.
This manifests itself as a randomly reproducible
bug when installing an app; the app icon may be
the fallback forever, or as long as something else
updates the icon theme.
Watch for the GtkIconTheme:changed signal, and
evict the texture cache when the theme changes.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/661
src/st/st-texture-cache.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
index eec28007b..bf54c6514 100644
--- a/src/st/st-texture-cache.c
+++ b/src/st/st-texture-cache.c
@@ -150,6 +150,14 @@ on_icon_theme_changed (StSettings *settings,
g_signal_emit (cache, signals[ICON_THEME_CHANGED], 0);
}
+static void
+on_gtk_icon_theme_changed (GtkIconTheme *icon_theme,
+ StTextureCache *self)
+{
+ st_texture_cache_evict_icons (self);
+ g_signal_emit (self, signals[ICON_THEME_CHANGED], 0);
+}
+
static void
st_texture_cache_init (StTextureCache *self)
{
@@ -160,6 +168,8 @@ st_texture_cache_init (StTextureCache *self)
self->priv->icon_theme = gtk_icon_theme_new ();
gtk_icon_theme_add_resource_path (self->priv->icon_theme,
"/org/gnome/shell/theme/icons");
+ g_signal_connect (self->priv->icon_theme, "changed",
+ G_CALLBACK (on_gtk_icon_theme_changed), self);
settings = st_settings_get ();
g_signal_connect (settings, "notify::gtk-icon-theme",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]