summaryrefslogtreecommitdiff
path: root/gtk/gtkcssimage.c
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2015-08-02 12:35:45 -0700
committerJasper St. Pierre <jstpierre@mecheye.net>2015-08-02 12:57:31 -0700
commitce75c835e1710c9c6db4fa9d45ca96a4faafa85f (patch)
tree38e85c8758365f058a2e1bde5a37793738b8a8dd /gtk/gtkcssimage.c
parent142efd186ded65597d3c7b32b0b6471c8d68f384 (diff)
downloadgtk+-ce75c835e1710c9c6db4fa9d45ca96a4faafa85f.tar.gz
cssimage: Don't start a transition if the start and end are the same
Since a lot of Adwaita sets transition: all, it's easy to end up in a state where we're making dummy transitions for all of the icons, most of which we'll never be showing.
Diffstat (limited to 'gtk/gtkcssimage.c')
-rw-r--r--gtk/gtkcssimage.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/gtkcssimage.c b/gtk/gtkcssimage.c
index 2d92829959..31b1e80567 100644
--- a/gtk/gtkcssimage.c
+++ b/gtk/gtkcssimage.c
@@ -87,6 +87,8 @@ gtk_css_image_real_transition (GtkCssImage *start,
return g_object_ref (start);
else if (progress >= 1.0)
return end ? g_object_ref (end) : NULL;
+ else if (_gtk_css_image_equal (start, end))
+ return g_object_ref (start);
else
return _gtk_css_image_cross_fade_new (start, end, progress);
}