From 0617be9fb97cc529dfc74bbc6547d009c7ccef9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 5 Nov 2019 19:35:41 +0100 Subject: [PATCH] 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 --- js/ui/windowManager.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index ec333714e..c184db181 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -1896,12 +1896,14 @@ var WindowManager = class { parent: actor.get_parent() }; if (this._movingWindow && window == this._movingWindow) { + record.parent.remove_child(actor); switchData.movingWindow = record; switchData.windows.push(switchData.movingWindow); - actor.reparent(switchData.movingWindowBin); + switchData.movingWindowBin.add_child(actor); } else if (window.get_workspace().index() == from) { + record.parent.remove_child(actor); switchData.windows.push(record); - actor.reparent(switchData.curGroup); + switchData.curGroup.add_child(actor); } else { let visible = false; for (let dir of Object.values(Meta.MotionDirection)) { @@ -1910,8 +1912,9 @@ var WindowManager = class { if (!info || info.index != window.get_workspace().index()) continue; + record.parent.remove_child(actor); switchData.windows.push(record); - actor.reparent(info.actor); + info.actor.add_child(actor); visible = true; break; } @@ -1936,7 +1939,8 @@ var WindowManager = class { let w = switchData.windows[i]; 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() != global.workspace_manager.get_active_workspace())