LayoutManager: untrack actors that are destroyed
If an actor is destroyed, calling get_transformed_size()/position() can return bogus values and trigger JS exceptions. This can happen if a tracked actor comes from an extension (such as classic mode's window-list) and that extension is deactivated. https://bugzilla.gnome.org/show_bug.cgi?id=723661
This commit is contained in:
parent
96ef0a178d
commit
477f28a6bd
@ -834,6 +834,8 @@ const LayoutManager = new Lang.Class({
|
|||||||
Lang.bind(this, this._queueUpdateRegions));
|
Lang.bind(this, this._queueUpdateRegions));
|
||||||
actorData.allocationId = actor.connect('notify::allocation',
|
actorData.allocationId = actor.connect('notify::allocation',
|
||||||
Lang.bind(this, this._queueUpdateRegions));
|
Lang.bind(this, this._queueUpdateRegions));
|
||||||
|
actorData.destroyId = actor.connect('destroy',
|
||||||
|
Lang.bind(this, this._untrackActor));
|
||||||
// Note that destroying actor will unset its parent, so we don't
|
// Note that destroying actor will unset its parent, so we don't
|
||||||
// need to connect to 'destroy' too.
|
// need to connect to 'destroy' too.
|
||||||
|
|
||||||
@ -852,6 +854,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
actor.disconnect(actorData.visibleId);
|
actor.disconnect(actorData.visibleId);
|
||||||
actor.disconnect(actorData.allocationId);
|
actor.disconnect(actorData.allocationId);
|
||||||
actor.disconnect(actorData.parentSetId);
|
actor.disconnect(actorData.parentSetId);
|
||||||
|
actor.disconnect(actorData.destroyId);
|
||||||
|
|
||||||
this._queueUpdateRegions();
|
this._queueUpdateRegions();
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user