From d4ce7aef595b5261c8bd7a03d7eeea8ab3c308e3 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 2 Oct 2012 21:11:49 -0300 Subject: [PATCH] dnd: Fix regression from e6fd2be We need to fetch the actor's parent before we reparent, otherwise we won't put it back properly at the end. --- js/ui/dnd.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/ui/dnd.js b/js/ui/dnd.js index b99eb45cb..25769d2c4 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -267,9 +267,6 @@ const _Draggable = new Lang.Class({ this._dragOffsetY = this._dragActor.y - this._dragStartY; } else { this._dragActor = this.actor; - this._dragActor.reparent(Main.uiGroup); - this._dragActor.raise_top(); - Shell.util_set_hidden_from_pick(this._dragActor, true); this._dragActorSource = undefined; this._dragOrigParent = this.actor.get_parent(); @@ -277,6 +274,10 @@ const _Draggable = new Lang.Class({ this._dragOrigY = this._dragActor.y; this._dragOrigScale = this._dragActor.scale_x; + this._dragActor.reparent(Main.uiGroup); + this._dragActor.raise_top(); + Shell.util_set_hidden_from_pick(this._dragActor, true); + let [actorStageX, actorStageY] = this.actor.get_transformed_position(); this._dragOffsetX = actorStageX - this._dragStartX; this._dragOffsetY = actorStageY - this._dragStartY;