background: don't leak background objects during quick changes
We currently let some backgrounds "fall through the cracks" if a bunch of change notifications come in at once. This commit fixes that. https://bugzilla.gnome.org/show_bug.cgi?id=697395
This commit is contained in:
parent
1ee88a2878
commit
9eae74357a
@ -742,11 +742,15 @@ const BackgroundManager = new Lang.Class({
|
|||||||
time: FADE_ANIMATION_TIME,
|
time: FADE_ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
onComplete: Lang.bind(this, function() {
|
onComplete: Lang.bind(this, function() {
|
||||||
if (this.background == background) {
|
if (this._newBackground == newBackground) {
|
||||||
this.background = newBackground;
|
this.background = newBackground;
|
||||||
this._newBackground = null;
|
this._newBackground = null;
|
||||||
background.actor.destroy();
|
} else {
|
||||||
|
newBackground.actor.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
background.actor.destroy();
|
||||||
|
|
||||||
this.emit('changed');
|
this.emit('changed');
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user