diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index ffd49fa07..5017446cc 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -412,6 +412,10 @@ AppWellIcon.prototype = { this._removeMenuTimeout(); Main.overview.beginItemDrag(this); })); + this._draggable.connect('drag-cancelled', Lang.bind(this, + function () { + Main.overview.cancelledItemDrag(this); + })); this._draggable.connect('drag-end', Lang.bind(this, function () { Main.overview.endItemDrag(this); diff --git a/js/ui/overview.js b/js/ui/overview.js index 3bb478923..34ebec541 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -474,6 +474,10 @@ Overview.prototype = { this.emit('item-drag-begin'); }, + cancelledItemDrag: function(source) { + this.emit('item-drag-cancelled'); + }, + endItemDrag: function(source) { this.emit('item-drag-end'); }, diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js index 0527d8f83..81fd89b19 100644 --- a/js/ui/searchDisplay.js +++ b/js/ui/searchDisplay.js @@ -49,6 +49,10 @@ SearchResult.prototype = { Lang.bind(this, function() { Main.overview.beginItemDrag(this); })); + draggable.connect('drag-cancelled', + Lang.bind(this, function() { + Main.overview.cancelledItemDrag(this); + })); draggable.connect('drag-end', Lang.bind(this, function() { Main.overview.endItemDrag(this);