[gnome-shell/wip/rstrode/rhel-7.9: 84/86] panel: Handle window getting removed that was never added
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/rstrode/rhel-7.9: 84/86] panel: Handle window getting removed that was never added
- Date: Fri, 12 Feb 2021 19:04:08 +0000 (UTC)
commit 1c8df9122f8b4c58a92463e2b86472d8034c046e
Author: Ray Strode <rstrode redhat com>
Date: Wed Oct 14 13:51:33 2020 -0400
panel: Handle window getting removed that was never added
For reasons that are not immediately clear, and actor is getting
removed that's never been added. This commit tries to cope
with that case without making a noise to the log.
js/ui/panel.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 2ac5886972..74a20cff5f 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -844,8 +844,13 @@ var Panel = new Lang.Class({
},
_onWindowActorRemoved(container, metaWindowActor) {
- this._trackedWindows.get(metaWindowActor).forEach(id => {
- metaWindowActor.disconnect(id);
+ let signalIds = this._trackedWindows.get(metaWindowActor);
+
+ if (!signalIds)
+ return;
+
+ signalIds.forEach(id => {
+ metaWindowActor.disconnect(id);
});
this._trackedWindows.delete(metaWindowActor);
this._updateSolidStyle();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]