[sushi] mainWindow: remove fade in and out animations



commit cccd5238be515d32836e318cdcb5019b7b1d5dfb
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Mar 9 10:41:59 2015 -0700

    mainWindow: remove fade in and out animations
    
    gnome-shell (or even other compositors) typically have their own
    animations. Don't interfere, since it also looks like these animations
    can deadlock with recent clutter and clutter-gtk.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745738

 src/js/ui/mainWindow.js |   46 ++++------------------------------------------
 1 files changed, 4 insertions(+), 42 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index 51ccb55..1d6339a 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -122,7 +122,6 @@ MainWindow.prototype = {
             new Clutter.BindConstraint({ coordinate: Clutter.BindCoordinate.SIZE,
                                          source: this._stage }));
         this._stage.add_actor(this._mainGroup);
-        this._mainGroup.set_opacity(0);
 
         this._gtkWindow.connect('key-press-event',
                                Lang.bind(this, this._onKeyPressEvent));
@@ -181,7 +180,7 @@ MainWindow.prototype = {
         if (key == Gdk.KEY_Escape ||
             key == Gdk.KEY_space ||
             key == Gdk.KEY_q)
-            this._fadeOutWindow();
+            this._clearAndQuit();
 
         if (key == Gdk.KEY_f ||
             key == Gdk.KEY_F11)
@@ -564,8 +563,7 @@ MainWindow.prototype = {
         }
 
         this._titleGroupLayout = new Clutter.BoxLayout();
-        this._titleGroup =  new Clutter.Box({ layout_manager: this._titleGroupLayout,
-                                              opacity: 0 });
+        this._titleGroup =  new Clutter.Box({ layout_manager: this._titleGroupLayout });
         this._stage.add_actor(this._titleGroup);
 
         this._titleGroup.add_constraint(
@@ -614,42 +612,6 @@ MainWindow.prototype = {
     /**************************************************************************
      *********************** Window move/fade helpers *************************
      **************************************************************************/
-    _fadeInWindow : function() {
-        this._mainGroup.set_opacity(0);
-        this._titleGroup.set_opacity(0);
-
-        this._gtkWindow.show_all();
-
-        Tweener.addTween(this._mainGroup,
-                         { opacity: 255,
-                           time: 0.3,
-                           transition: 'easeOutQuad' });
-        Tweener.addTween(this._titleGroup,
-                         { opacity: 255,
-                           time: 0.3,
-                           transition: 'easeOutQuad' });
-    },
-
-    _fadeOutWindow : function() {
-        this._removeToolbarTimeout();
-
-        Tweener.addTween(this._titleGroup,
-                         { opacity: 0,
-                           time: 0.15,
-                           transition: 'easeOutQuad'
-                         });
-
-        Tweener.addTween(this._mainGroup,
-                         { opacity: 0,
-                           time: 0.15,
-                           transition: 'easeOutQuad',
-                           onComplete: function () {
-                               this._clearAndQuit();
-                           },
-                           onCompleteScope: this
-                         });
-    },
-
     _clearAndQuit : function() {
         if (this._renderer.clear)
             this._renderer.clear();
@@ -678,7 +640,7 @@ MainWindow.prototype = {
         this._createToolbar();
         this._createTitle();
 
-        this._fadeInWindow();
+        this._gtkWindow.show_all();
     },
 
     setTitle : function(label) {
@@ -704,6 +666,6 @@ MainWindow.prototype = {
     },
 
     close : function() {
-        this._fadeOutWindow();
+        this._clearAndQuit();
     }
 }


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