[gnome-shell] iconGrid: Avoid animating the same icon twice



commit b5651e38c721b932f21c4bfd9514db9de9b02853
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Fri Feb 7 17:23:11 2020 +0800

    iconGrid: Avoid animating the same icon twice
    
    If the icon proper has opacity of zero then that's probably because a
    clone of it is animating. So avoid animating the source actor too.
    
    And if there's any other reason for the opacity being zero, still don't
    animate it because we can't see it :)
    
    Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/2167

 js/ui/iconGrid.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index 67691c7d50..19d019f4db 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -195,7 +195,7 @@ function zoomOutActorAtPos(actor, x, y) {
 }
 
 function animateIconPosition(icon, box, flags, nChangedIcons) {
-    if (!icon.has_allocation() || icon.allocation.equal(box)) {
+    if (!icon.has_allocation() || icon.allocation.equal(box) || icon.opacity === 0) {
         icon.allocate(box, flags);
         return false;
     }


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