diff --git a/js/ui/dnd.js b/js/ui/dnd.js index c0d09ce5f..54193ad80 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -236,7 +236,7 @@ const _Draggable = new Lang.Class({ if (this.actor._delegate && this.actor._delegate.getDragActor) { this._dragActor = this.actor._delegate.getDragActor(); - this._dragActor.reparent(Main.uiGroup); + Main.uiGroup.add_child(this._dragActor); this._dragActor.raise_top(); Shell.util_set_hidden_from_pick(this._dragActor, true); @@ -285,7 +285,8 @@ const _Draggable = new Lang.Class({ this._dragOffsetX = actorStageX - this._dragStartX; this._dragOffsetY = actorStageY - this._dragStartY; - this._dragActor.reparent(Main.uiGroup); + this._dragOrigParent.remove_actor(this._dragActor); + Main.uiGroup.add_child(this._dragActor); this._dragActor.raise_top(); Shell.util_set_hidden_from_pick(this._dragActor, true); } @@ -555,7 +556,8 @@ const _Draggable = new Lang.Class({ _onAnimationComplete : function (dragActor, eventTime) { if (this._dragOrigParent) { - dragActor.reparent(this._dragOrigParent); + Main.uiGroup.remove_child(this._dragActor); + this._dragOrigParent.add_actor(this._dragActor); dragActor.set_scale(this._dragOrigScale, this._dragOrigScale); dragActor.set_position(this._dragOrigX, this._dragOrigY); } else {