mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
icon-theme: Drop loading_themes recursion check
This was added in 0b1c9b7cc2
to protect
against reentrancy from the theme-changed signal, but we only emit this
from an idle these days, so thats not necessary anymore, and the recursion
check was causing issues with the async operations where a different
thread loading the theme caused the calling thread to thing the
theme is valid.
This commit is contained in:
parent
71b3b54215
commit
317b395f0f
@ -218,7 +218,6 @@ struct _GtkIconTheme
|
||||
guint is_display_singleton : 1;
|
||||
guint pixbuf_supports_svg : 1;
|
||||
guint themes_valid : 1;
|
||||
guint loading_themes : 1;
|
||||
|
||||
/* A list of all the themes needed to look up icons.
|
||||
* In search order, without duplicates
|
||||
@ -1628,10 +1627,6 @@ ensure_valid_themes (GtkIconTheme *self, gboolean non_blocking)
|
||||
gboolean was_valid = self->themes_valid;
|
||||
gint64 before = g_get_monotonic_time ();
|
||||
|
||||
if (self->loading_themes)
|
||||
return TRUE;
|
||||
self->loading_themes = TRUE;
|
||||
|
||||
if (self->themes_valid)
|
||||
{
|
||||
g_get_current_time (&tv);
|
||||
@ -1666,7 +1661,6 @@ ensure_valid_themes (GtkIconTheme *self, gboolean non_blocking)
|
||||
if (gdk_profiler_is_running ())
|
||||
gdk_profiler_add_mark (before * 1000, (g_get_monotonic_time () - before) * 1000, "icon theme load", NULL);
|
||||
|
||||
self->loading_themes = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user