From eca98aee427c0a6c221c42b34a8123b5098db860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 31 Aug 2019 01:40:53 +0200 Subject: [PATCH] ripples: Add destroy() method and remove them when unneeded https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700 --- js/ui/layout.js | 2 ++ js/ui/ripples.js | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/js/ui/layout.js b/js/ui/layout.js index fe4248766..79c51cf5c 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -1224,6 +1224,8 @@ var HotCorner = class HotCorner { if (this.actor) this.actor.destroy(); + + this._ripples.destroy(); } _toggleOverview() { diff --git a/js/ui/ripples.js b/js/ui/ripples.js index ef9cbdea0..99c1dfc53 100644 --- a/js/ui/ripples.js +++ b/js/ui/ripples.js @@ -34,6 +34,12 @@ var Ripples = class Ripples { this._ripple3.set_pivot_point(px, py); } + destroy() { + this._ripple1.destroy(); + this._ripple2.destroy(); + this._ripple3.destroy(); + } + _animRipple(ripple, delay, duration, startScale, startOpacity, finalScale) { // We draw a ripple by using a source image and animating it scaling // outwards and fading away. We want the ripples to move linearly