From fb86b18cf1b131e1307eae8c990c1bc2d4b64c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 2 Dec 2024 13:10:50 +0100 Subject: [PATCH] window-list: Fix disconnecting window signals in context menu Menus are not actors themselves, so they are not "destroyables" in terms of automatic signal disconnection, with the result that we currently leak window signals. Fix this by using the menu's actor as tracked object, so the signals are disconnected automatically when the actor is destroyed. Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/474 Part-of: (cherry picked from commit 4a841dfd4977c3d497b0241c7d0016c4290b3e07) --- extensions/window-list/extension.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index cd0a6d98..bc81c76a 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -77,7 +77,7 @@ class WindowContextMenu extends PopupMenu.PopupMenu { 'notify::minimized', this._updateMinimizeItem.bind(this), 'notify::maximized-horizontally', this._updateMaximizeItem.bind(this), 'notify::maximized-vertically', this._updateMaximizeItem.bind(this), - this); + this.actor); this._updateMinimizeItem(); this._updateMaximizeItem();