[gnome-shell/gbsneto/fix-frequent-view-clones: 11/11] iconGrid: Only animate visible icons



commit 413c677fcf192d438fc2da9fc579fdb96a62f816
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Aug 31 12:32:31 2019 -0300

    iconGrid: Only animate visible icons
    
    Mutter recently added an optimization to only allocate
    visible children [1]. That broke ClutterClones, but it
    was subsequently fixed [2].
    
    However, that exposed a third problem, this time with
    FrequentView: visible but transparent icons, that are
    not allocated by the icon grid, were cloned and animated
    during the spring animation.
    
    Only animate visible icons with opacity greater than 0.
    
    [1] https://gitlab.gnome.org/GNOME/mutter/commit/0eab73dc
    [2] https://gitlab.gnome.org/GNOME/mutter/commit/08a3cbfc
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/696

 js/ui/iconGrid.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index 1d22e821aa..0cddb6256d 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -427,7 +427,7 @@ var IconGrid = GObject.registerClass({
      * set of items to be animated.
      */
     _getChildrenToAnimate() {
-        return this._getVisibleChildren();
+        return this._getVisibleChildren().filter(child => child.opacity > 0);
     }
 
     _resetAnimationActors() {
@@ -884,7 +884,7 @@ var PaginatedIconGrid = GObject.registerClass({
 
     // Overridden from IconGrid
     _getChildrenToAnimate() {
-        let children = this._getVisibleChildren();
+        let children = super._getChildrenToAnimate();
         let firstIndex = this._childrenPerPage * this.currentPage;
         let lastIndex = firstIndex + this._childrenPerPage;
 


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