workspace: Fix a signal leak in WorkspaceBackground

(cherry picked from commit ed7fe756ef)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2181>
This commit is contained in:
Daniel van Vugt 2022-01-21 18:47:09 +08:00 committed by Florian Müllner
parent 0f34bfebd4
commit 67d1e87db0

View file

@ -939,7 +939,7 @@ class WorkspaceBackground extends St.Widget {
this._workarea = Main.layoutManager.getWorkAreaForMonitor(monitorIndex);
this._stateAdjustment = stateAdjustment;
stateAdjustment.connect('notify::value', () => {
this._adjustmentId = stateAdjustment.connect('notify::value', () => {
this._updateBorderRadius();
this.queue_relayout();
});
@ -1054,6 +1054,11 @@ class WorkspaceBackground extends St.Widget {
global.display.disconnect(this._workareasChangedId);
delete this._workareasChangedId;
}
if (this._adjustmentId) {
this._stateAdjustment.disconnect(this._adjustmentId);
delete this._adjustmentId;
}
}
});