From 4a841dfd4977c3d497b0241c7d0016c4290b3e07 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: --- 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 a4268589..2c8f4ad4 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -99,7 +99,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();