layout: Destroy non-adopted uiGroup actors

Move back actors that were adopted from mutter (window_group,
top_window_group, the feedback group) from the uiGroup to the stage, and
then destroy the uiGroup. This will tear down more or less all of GNOME
Shells actors gracefully.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
This commit is contained in:
Jonas Ådahl 2022-08-17 16:30:53 +02:00
parent 411360cd1b
commit f2ca53b9e0

View File

@ -221,6 +221,20 @@ var LayoutManager = GObject.registerClass({
global.stage.remove_actor(global.window_group);
this.uiGroup.add_actor(global.window_group);
global.connect('shutdown', () => {
const adoptedUiGroupActors = [
global.window_group,
global.top_window_group,
Meta.get_feedback_group_for_display(global.display),
];
for (let adoptedActor of adoptedUiGroupActors) {
this.uiGroup.remove_actor(adoptedActor);
global.stage.add_actor(adoptedActor);
}
this.uiGroup.destroy();
});
// Using addChrome() to add actors to uiGroup will position actors
// underneath the top_window_group.