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
This commit is contained in:
parent
b65b4e3cae
commit
87de09a83e
@ -703,6 +703,9 @@ var _Draggable = class _Draggable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onAnimationComplete(dragActor, eventTime) {
|
_onAnimationComplete(dragActor, eventTime) {
|
||||||
|
this.emit('drag-end', eventTime, false);
|
||||||
|
this._finishAnimation();
|
||||||
|
|
||||||
if (this._dragOrigParent) {
|
if (this._dragOrigParent) {
|
||||||
Main.uiGroup.remove_child(dragActor);
|
Main.uiGroup.remove_child(dragActor);
|
||||||
this._dragOrigParent.add_actor(dragActor);
|
this._dragOrigParent.add_actor(dragActor);
|
||||||
@ -711,9 +714,6 @@ var _Draggable = class _Draggable {
|
|||||||
} else {
|
} else {
|
||||||
dragActor.destroy();
|
dragActor.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.emit('drag-end', eventTime, false);
|
|
||||||
this._finishAnimation();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_dragComplete() {
|
_dragComplete() {
|
||||||
|
Loading…
Reference in New Issue
Block a user