layout: Explicitly destroy hot corners on shutdown

This won't be handled by our existing actor destruction path as the
ripple actors are added directly to the stage and not the uiGroup.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2623>
This commit is contained in:
Jonas Ådahl 2023-02-02 15:50:43 +01:00 committed by Marge Bot
parent 7f7ec2a866
commit def50c38da

View File

@ -236,6 +236,7 @@ var LayoutManager = GObject.registerClass({
global.stage.add_actor(adoptedActor); global.stage.add_actor(adoptedActor);
} }
this._destroyHotCorners();
this.uiGroup.destroy(); this.uiGroup.destroy();
}); });
@ -415,13 +416,14 @@ var LayoutManager = GObject.registerClass({
} }
} }
_destroyHotCorners() {
this.hotCorners.forEach(corner => corner?.destroy());
this.hotCorners = [];
}
_updateHotCorners() { _updateHotCorners() {
// destroy old hot corners // destroy old hot corners
this.hotCorners.forEach(corner => { this._destroyHotCorners();
if (corner)
corner.destroy();
});
this.hotCorners = [];
if (!this._interfaceSettings.get_boolean('enable-hot-corners')) { if (!this._interfaceSettings.get_boolean('enable-hot-corners')) {
this.emit('hot-corners-changed'); this.emit('hot-corners-changed');