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: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/362>
(cherry picked from commit 4a841dfd49)
This commit is contained in:
Florian Müllner
2024-12-02 13:10:50 +01:00
parent a75f8a7d52
commit 959dc522e7
+1 -1
View File
@@ -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();