From 6ae914da2f8f22fe1eae8e83958f4b46b93d0157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 9 Mar 2011 16:40:48 +0100 Subject: [PATCH] overview: Handle drag-cancelled signal for items Allow handling the drag-cancelled signal for non-window items, just like the handling for windows instroduced in commit a80e88e33. https://bugzilla.gnome.org/show_bug.cgi?id=644324 --- js/ui/appDisplay.js | 4 ++++ js/ui/overview.js | 4 ++++ js/ui/searchDisplay.js | 4 ++++ 3 files changed, 12 insertions(+) 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);