From 87de09a83e81e7abed0e7aa29810bc401b7cda35 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 27 Nov 2018 12:33:15 -0200 Subject: [PATCH] dnd: Finish animation before destroying actor Otherwise JavaScript aborts the execution of the function and the drag is never released. That's because _dragComplete tries to unhide this._dragActor from picking, and that cannot be done after calling this._dragActor.destroy(), which is the case now. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/744 --- js/ui/dnd.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 14ccb2af3..f30151070 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -703,6 +703,9 @@ var _Draggable = class _Draggable { } _onAnimationComplete(dragActor, eventTime) { + this.emit('drag-end', eventTime, false); + this._finishAnimation(); + if (this._dragOrigParent) { Main.uiGroup.remove_child(dragActor); this._dragOrigParent.add_actor(dragActor); @@ -711,9 +714,6 @@ var _Draggable = class _Draggable { } else { dragActor.destroy(); } - - this.emit('drag-end', eventTime, false); - this._finishAnimation(); } _dragComplete() {