[gnome-shell] overviewControls: don't perform translation when target is met already



commit 3056fc471008ca6f0afe199cc16961bd1cda4bcf
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Feb 18 14:17:29 2013 -0500

    overviewControls: don't perform translation when target is met already
    
    Fixes a regression from ccb81919f79f9f684234deb8f6b1fcdaae3e7965

 js/ui/overviewControls.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index 39ddc78..df4d637 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -144,6 +144,9 @@ const SlidingControl = new Lang.Class({
             translationEnd = translation;
         }
 
+        if (this.actor.translation_x == translationEnd)
+            return;
+
         this.actor.translation_x = translationStart;
         Tweener.addTween(this.actor, { translation_x: translationEnd,
                                        time: SIDE_CONTROLS_ANIMATION_TIME,


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