js: Stop using ClutterContainer API
These have been long deprecated over in clutter, and (via several vtables) simply forward the call to the equivalent ClutterActor methods Save ourselves the hassle and just use ClutterActor methods directly Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3010>
This commit is contained in:
@ -225,8 +225,8 @@ export const LayoutManager = GObject.registerClass({
|
||||
|
||||
global.stage.add_child(this.uiGroup);
|
||||
|
||||
global.stage.remove_actor(global.window_group);
|
||||
this.uiGroup.add_actor(global.window_group);
|
||||
global.stage.remove_child(global.window_group);
|
||||
this.uiGroup.add_child(global.window_group);
|
||||
global.connect('shutdown', () => {
|
||||
const monitorManager = global.backend.get_monitor_manager();
|
||||
monitorManager.disconnectObject(this);
|
||||
@ -238,8 +238,8 @@ export const LayoutManager = GObject.registerClass({
|
||||
];
|
||||
|
||||
for (let adoptedActor of adoptedUiGroupActors) {
|
||||
this.uiGroup.remove_actor(adoptedActor);
|
||||
global.stage.add_actor(adoptedActor);
|
||||
this.uiGroup.remove_child(adoptedActor);
|
||||
global.stage.add_child(adoptedActor);
|
||||
}
|
||||
|
||||
this._destroyHotCorners();
|
||||
@ -250,9 +250,9 @@ export const LayoutManager = GObject.registerClass({
|
||||
// Using addChrome() to add actors to uiGroup will position actors
|
||||
// underneath the top_window_group.
|
||||
// To insert actors at the top of uiGroup, we use addTopChrome() or
|
||||
// add the actor directly using uiGroup.add_actor().
|
||||
global.stage.remove_actor(global.top_window_group);
|
||||
this.uiGroup.add_actor(global.top_window_group);
|
||||
// add the actor directly using uiGroup.add_child().
|
||||
global.stage.remove_child(global.top_window_group);
|
||||
this.uiGroup.add_child(global.top_window_group);
|
||||
|
||||
this.overviewGroup = new St.Widget({
|
||||
name: 'overviewGroup',
|
||||
@ -292,7 +292,7 @@ export const LayoutManager = GObject.registerClass({
|
||||
name: 'modalDialogGroup',
|
||||
layout_manager: new Clutter.BinLayout(),
|
||||
});
|
||||
this.uiGroup.add_actor(this.modalDialogGroup);
|
||||
this.uiGroup.add_child(this.modalDialogGroup);
|
||||
|
||||
this.keyboardBox = new St.BoxLayout({
|
||||
name: 'keyboardBox',
|
||||
@ -311,11 +311,11 @@ export const LayoutManager = GObject.registerClass({
|
||||
// A dummy actor that tracks the mouse or text cursor, based on the
|
||||
// position and size set in setDummyCursorGeometry.
|
||||
this.dummyCursor = new St.Widget({width: 0, height: 0, opacity: 0});
|
||||
this.uiGroup.add_actor(this.dummyCursor);
|
||||
this.uiGroup.add_child(this.dummyCursor);
|
||||
|
||||
let feedbackGroup = Meta.get_feedback_group_for_display(global.display);
|
||||
global.stage.remove_actor(feedbackGroup);
|
||||
this.uiGroup.add_actor(feedbackGroup);
|
||||
global.stage.remove_child(feedbackGroup);
|
||||
this.uiGroup.add_child(feedbackGroup);
|
||||
|
||||
this._backgroundGroup = new Meta.BackgroundGroup();
|
||||
global.window_group.add_child(this._backgroundGroup);
|
||||
@ -856,7 +856,7 @@ export const LayoutManager = GObject.registerClass({
|
||||
// monitor (it will be hidden whenever a fullscreen window is visible,
|
||||
// and shown otherwise)
|
||||
addChrome(actor, params) {
|
||||
this.uiGroup.add_actor(actor);
|
||||
this.uiGroup.add_child(actor);
|
||||
if (this.uiGroup.contains(global.top_window_group))
|
||||
this.uiGroup.set_child_below_sibling(actor, global.top_window_group);
|
||||
this._trackActor(actor, params);
|
||||
@ -868,7 +868,7 @@ export const LayoutManager = GObject.registerClass({
|
||||
//
|
||||
// Like addChrome(), but adds @actor above all windows, including popups.
|
||||
addTopChrome(actor, params) {
|
||||
this.uiGroup.add_actor(actor);
|
||||
this.uiGroup.add_child(actor);
|
||||
this._trackActor(actor, params);
|
||||
}
|
||||
|
||||
@ -916,7 +916,7 @@ export const LayoutManager = GObject.registerClass({
|
||||
//
|
||||
// Removes @actor from the chrome
|
||||
removeChrome(actor) {
|
||||
this.uiGroup.remove_actor(actor);
|
||||
this.uiGroup.remove_child(actor);
|
||||
this._untrackActor(actor);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user