From def50c38dafdeee5c20b7c59ebe39189cb2dcf6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 2 Feb 2023 15:50:43 +0100 Subject: [PATCH] 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: --- js/ui/layout.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/js/ui/layout.js b/js/ui/layout.js index 090295f0f..ed09c8f83 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -236,6 +236,7 @@ var LayoutManager = GObject.registerClass({ global.stage.add_actor(adoptedActor); } + this._destroyHotCorners(); this.uiGroup.destroy(); }); @@ -415,13 +416,14 @@ var LayoutManager = GObject.registerClass({ } } + _destroyHotCorners() { + this.hotCorners.forEach(corner => corner?.destroy()); + this.hotCorners = []; + } + _updateHotCorners() { // destroy old hot corners - this.hotCorners.forEach(corner => { - if (corner) - corner.destroy(); - }); - this.hotCorners = []; + this._destroyHotCorners(); if (!this._interfaceSettings.get_boolean('enable-hot-corners')) { this.emit('hot-corners-changed');