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:
Jasper St. Pierre 2013-09-11 15:09:09 -04:00
parent db1c65970b
commit 744749f2f3

View File

@ -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;
}