[gnome-shell/gbsneto/dnd-fixes: 4/4] dnd: Finish animation before destroying actor
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/dnd-fixes: 4/4] dnd: Finish animation before destroying actor
- Date: Thu, 26 Sep 2019 13:32:32 +0000 (UTC)
commit 87de09a83e81e7abed0e7aa29810bc401b7cda35
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Nov 27 12:33:15 2018 -0200
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 14ccb2af3a..f301510704 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() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]