Skip to content

Commit 43677cb

Browse files
committed
layout.js: Connect to tracked actors' destroy signal.
This is needed as of 5.4, as parent-set is no longer called during actor destruction. This (once more) eliminates the need for the user to explicitly call removeChrome on tracked actors. ref: https://gitlab.gnome.org/GNOME/mutter/-/commit/f376a318ba90fc29d3d661df4f55698459f31cfa Fixes #11103
1 parent 6d29765 commit 43677cb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

js/ui/layout.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,11 @@ Chrome.prototype = {
527527
Lang.bind(this, this._queueUpdateRegions));
528528
actorData.parentSetId = actor.connect('parent-set',
529529
Lang.bind(this, this._actorReparented));
530-
// Note that destroying actor will unset its parent, so we don't
531-
// need to connect to 'destroy' too.
530+
// Note that destroying actor unsets its parent, but does not emit
531+
// parent-set during destruction.
532+
// https://gitlab.gnome.org/GNOME/mutter/-/commit/f376a318ba90fc29d3d661df4f55698459f31cfa
533+
actorData.destroyId = actor.connect('destroy',
534+
Lang.bind(this, this._untrackActor));
532535

533536
this._trackedActors.push(actorData);
534537
this._queueUpdateRegions();
@@ -545,6 +548,7 @@ Chrome.prototype = {
545548
actor.disconnect(actorData.visibleId);
546549
actor.disconnect(actorData.allocationId);
547550
actor.disconnect(actorData.parentSetId);
551+
actor.disconnect(actorData.destroyId);
548552

549553
this._queueUpdateRegions();
550554
},

0 commit comments

Comments
 (0)