From b5651e38c721b932f21c4bfd9514db9de9b02853 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Fri, 7 Feb 2020 17:23:11 +0800 Subject: [PATCH] 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 67691c7d5..19d019f4d 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; }