[gnome-shell] iconGrid: Make actors non reactive while animating



commit 9e5704b49863d1699030387cb6091dfb9947ac39
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Tue Sep 2 22:49:10 2014 +0200

    iconGrid: Make actors non reactive while animating
    
    Although the actor are with opacity 0, they were reactive, so the if the
    user quickly make a click on the grid while animating it can launch an
    app accidentally.
    To avoid that make the actors non reactive while animating.

 js/ui/iconGrid.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index f00b22f..cd29173 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -432,6 +432,7 @@ const IconGrid = new Lang.Class({
         for (let index = 0; index < actors.length; index++) {
             let actor = actors[index];
             actor.opacity = 0;
+            actor.reactive = false;
 
             let delay = index / actors.length * ANIMATION_MAX_DELAY_FOR_ITEM;
             let [originalX, originalY] = actor.get_transformed_position();
@@ -465,6 +466,7 @@ const IconGrid = new Lang.Class({
                                                             this._animationDone();
 
                                                         actor.opacity = 255;
+                                                        actor.reactive = true;
                                                         actorClone.destroy();
                                                     })
                                                    });
@@ -508,6 +510,7 @@ const IconGrid = new Lang.Class({
         for (let index = 0; index < actors.length; index++) {
             let actor = actors[index];
             actor.opacity = 0;
+            actor.reactive = false;
 
             let actorClone = new Clutter.Clone({ source: actor });
             Main.uiGroup.add_actor(actorClone);
@@ -542,6 +545,7 @@ const IconGrid = new Lang.Class({
                                            this._animationDone();
 
                                        actor.opacity = 255;
+                                       actor.reactive = true;
                                        actorClone.destroy();
                                    })};
                 fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,


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