[gtk+] cssimage: Don't start a transition if the start and end are the same
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] cssimage: Don't start a transition if the start and end are the same
- Date: Sun, 2 Aug 2015 19:57:36 +0000 (UTC)
commit ce75c835e1710c9c6db4fa9d45ca96a4faafa85f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Aug 2 12:35:45 2015 -0700
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.
gtk/gtkcssimage.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssimage.c b/gtk/gtkcssimage.c
index 2d92829..31b1e80 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]