window-list: Fix cleaning up signal on removal

The map uses windows as key, so trying to remove the handler ID
will leave stray windows/signals.

Spotted by Ron Yorston.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/225>
This commit is contained in:
Florian Müllner
2022-03-29 17:06:40 +02:00
parent 36fc042e27
commit a51145f9db

View File

@@ -998,7 +998,7 @@ class WindowList extends St.Widget {
const id = this._windowSignals.get(win);
if (id)
win.disconnect(id);
this._windowSignals.delete(id);
this._windowSignals.delete(win);
let children = this._windowList.get_children();
let child = children.find(c => c.metaWindow === win);