From 959dc522e797929516543ddf4f4c7395f3fa98e5 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 bd955d11..cc9c87ab 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -79,7 +79,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();