windowManager: Stop using Clutter.Actor.prototype.reparent()
It has been deprecated for ages, and is about to be dropped from mutter. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808
This commit is contained in:
parent
0749ac27ce
commit
0617be9fb9
@ -1896,12 +1896,14 @@ var WindowManager = class {
|
|||||||
parent: actor.get_parent() };
|
parent: actor.get_parent() };
|
||||||
|
|
||||||
if (this._movingWindow && window == this._movingWindow) {
|
if (this._movingWindow && window == this._movingWindow) {
|
||||||
|
record.parent.remove_child(actor);
|
||||||
switchData.movingWindow = record;
|
switchData.movingWindow = record;
|
||||||
switchData.windows.push(switchData.movingWindow);
|
switchData.windows.push(switchData.movingWindow);
|
||||||
actor.reparent(switchData.movingWindowBin);
|
switchData.movingWindowBin.add_child(actor);
|
||||||
} else if (window.get_workspace().index() == from) {
|
} else if (window.get_workspace().index() == from) {
|
||||||
|
record.parent.remove_child(actor);
|
||||||
switchData.windows.push(record);
|
switchData.windows.push(record);
|
||||||
actor.reparent(switchData.curGroup);
|
switchData.curGroup.add_child(actor);
|
||||||
} else {
|
} else {
|
||||||
let visible = false;
|
let visible = false;
|
||||||
for (let dir of Object.values(Meta.MotionDirection)) {
|
for (let dir of Object.values(Meta.MotionDirection)) {
|
||||||
@ -1910,8 +1912,9 @@ var WindowManager = class {
|
|||||||
if (!info || info.index != window.get_workspace().index())
|
if (!info || info.index != window.get_workspace().index())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
record.parent.remove_child(actor);
|
||||||
switchData.windows.push(record);
|
switchData.windows.push(record);
|
||||||
actor.reparent(info.actor);
|
info.actor.add_child(actor);
|
||||||
visible = true;
|
visible = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1936,7 +1939,8 @@ var WindowManager = class {
|
|||||||
let w = switchData.windows[i];
|
let w = switchData.windows[i];
|
||||||
|
|
||||||
w.window.disconnect(w.windowDestroyId);
|
w.window.disconnect(w.windowDestroyId);
|
||||||
w.window.reparent(w.parent);
|
w.window.get_parent().remove_child(w.window);
|
||||||
|
w.parent.add_child(w.window);
|
||||||
|
|
||||||
if (w.window.get_meta_window().get_workspace() !=
|
if (w.window.get_meta_window().get_workspace() !=
|
||||||
global.workspace_manager.get_active_workspace())
|
global.workspace_manager.get_active_workspace())
|
||||||
|
Loading…
Reference in New Issue
Block a user