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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user