ripples: Add destroy() method and remove them when unneeded

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
This commit is contained in:
Marco Trevisan (Treviño) 2019-08-31 01:40:53 +02:00 committed by Florian Müllner
parent ea5aaa8ab2
commit eca98aee42
2 changed files with 8 additions and 0 deletions

View File

@ -1224,6 +1224,8 @@ var HotCorner = class HotCorner {
if (this.actor)
this.actor.destroy();
this._ripples.destroy();
}
_toggleOverview() {

View File

@ -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