[gnome-shell] st-theme-node: Disable transitions if animations-enabled is off



commit c3775c0f56875cb7ca0651a6c6eb70ee0f8879b4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Apr 19 14:06:02 2013 -0400

    st-theme-node: Disable transitions if animations-enabled is off
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698391

 src/st/st-widget.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
index 42992ec..7133e85 100644
--- a/src/st/st-widget.c
+++ b/src/st/st-widget.c
@@ -1533,6 +1533,7 @@ st_widget_recompute_style (StWidget    *widget,
   StThemeNode *new_theme_node = st_widget_get_theme_node (widget);
   int transition_duration;
   gboolean paint_equal;
+  gboolean animations_enabled;
 
   if (new_theme_node == old_theme_node)
     {
@@ -1551,7 +1552,11 @@ st_widget_recompute_style (StWidget    *widget,
   if (paint_equal)
     st_theme_node_copy_cached_paint_state (new_theme_node, old_theme_node);
 
-  if (transition_duration > 0)
+  g_object_get (gtk_settings_get_default (),
+                "gtk-enable-animations", &animations_enabled,
+                NULL);
+
+  if (animations_enabled && transition_duration > 0)
     {
       if (widget->priv->transition_animation != NULL)
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]