[gnome-shell] WindowOverlay: remove animations when relayouting



commit 5c7f0a0ad82fc212706557dc5cd9fb6a2ed7abd7
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sat Feb 16 17:26:28 2013 +0100

    WindowOverlay: remove animations when relayouting
    
    If WindowOverlay.relayout() is called without animation, we must stop
    any preexisting animation, otherwise it will continue to run with the
    previous parameters and cause the overlay to end up in the wrong position.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693970

 js/ui/workspace.js |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 85fae08..8538729 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -529,10 +529,15 @@ const WindowOverlay = new Lang.Class({
     },
 
     relayout: function(animate) {
-        let [cloneX, cloneY, cloneWidth, cloneHeight] = this._windowClone.slot;
-
         let button = this.closeButton;
         let title = this.title;
+        let border = this.border;
+
+        Tweener.removeTweens(button);
+        Tweener.removeTweens(title);
+        Tweener.removeTweens(border);
+
+        let [cloneX, cloneY, cloneWidth, cloneHeight] = this._windowClone.slot;
 
         let layout = Meta.prefs_get_button_layout();
         let side = layout.left_buttons.indexOf(Meta.ButtonFunction.CLOSE) > -1 ? St.Side.LEFT : 
St.Side.RIGHT;


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