dnd: Remove the queue updated ID for completed drags as well
I thought that cancelDrag was called for completed drags as well, but it's not. Move the updateHoverId source removal to dragComplete. This fixes "this._dragActor is undefined" warnings after completed drags. https://bugzilla.gnome.org/show_bug.cgi?id=707935
This commit is contained in:
parent
db1c65970b
commit
744749f2f3
10
js/ui/dnd.js
10
js/ui/dnd.js
@ -517,11 +517,6 @@ const _Draggable = new Lang.Class({
|
||||
},
|
||||
|
||||
_cancelDrag: function(eventTime) {
|
||||
if (this._updateHoverId) {
|
||||
GLib.source_remove(this._updateHoverId);
|
||||
this._updateHoverId = 0;
|
||||
}
|
||||
|
||||
this.emit('drag-cancelled', eventTime);
|
||||
this._dragInProgress = false;
|
||||
let [snapBackX, snapBackY, snapBackScale] = this._getRestoreLocation();
|
||||
@ -617,6 +612,11 @@ const _Draggable = new Lang.Class({
|
||||
this._lastEnterActor = null;
|
||||
}
|
||||
|
||||
if (this._updateHoverId) {
|
||||
GLib.source_remove(this._updateHoverId);
|
||||
this._updateHoverId = 0;
|
||||
}
|
||||
|
||||
this._dragActor = undefined;
|
||||
currentDraggable = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user