From b65b4e3caee8808ecd7ffab513021cc23a9842ee Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 27 Nov 2018 12:21:57 -0200 Subject: [PATCH] dnd: Don't mix callback argument and object field usage This will be important for the next commit, since _dragComplete() changes the value of this._dragActor and we need to keep a valid reference to it. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/744 --- js/ui/dnd.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ui/dnd.js b/js/ui/dnd.js index e27c3691f..14ccb2af3 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -704,8 +704,8 @@ var _Draggable = class _Draggable { _onAnimationComplete(dragActor, eventTime) { if (this._dragOrigParent) { - Main.uiGroup.remove_child(this._dragActor); - this._dragOrigParent.add_actor(this._dragActor); + Main.uiGroup.remove_child(dragActor); + this._dragOrigParent.add_actor(dragActor); dragActor.set_scale(this._dragOrigScale, this._dragOrigScale); dragActor.set_position(this._dragOrigX, this._dragOrigY); } else {