[gnome-shell] workspaces-view: Zoom out early on canceled item drags



commit 7f35b2dc43d11aa68f025eee69c68cf8ac758159
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Mar 9 16:53:26 2011 +0100

    workspaces-view: Zoom out early on canceled item drags
    
    Start the zoom at the same time as the snapback animation, as it's
    already done for window snapbacks.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644324

 js/ui/workspacesView.js |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 774ea59..d2a8851 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -597,6 +597,7 @@ WorkspacesDisplay.prototype = {
         this._switchWorkspaceNotifyId = 0;
 
         this._itemDragBeginId = 0;
+        this._itemDragCancelledId = 0;
         this._itemDragEndId = 0;
         this._windowDragBeginId = 0;
         this._windowDragCancelledId = 0;
@@ -629,6 +630,9 @@ WorkspacesDisplay.prototype = {
         if (this._itemDragBeginId == 0)
             this._itemDragBeginId = Main.overview.connect('item-drag-begin',
                                                           Lang.bind(this, this._dragBegin));
+        if (this._itemDragCancelledId == 0)
+            this._itemDragCancelledId = Main.overview.connect('item-drag-cancelled',
+                                                              Lang.bind(this, this._dragCancelled));
         if (this._itemDragEndId == 0)
             this._itemDragEndId = Main.overview.connect('item-drag-end',
                                                         Lang.bind(this, this._dragEnd));
@@ -664,7 +668,11 @@ WorkspacesDisplay.prototype = {
             Main.overview.disconnect(this._itemDragBeginId);
             this._itemDragBeginId = 0;
         }
-        if (this._itemEndBeginId > 0) {
+        if (this._itemDragCancelledId > 0) {
+            Main.overview.disconnect(this._itemDragCancelledId);
+            this._itemDragCancelledId = 0;
+        }
+        if (this._itemDragEndId > 0) {
             Main.overview.disconnect(this._itemDragEndId);
             this._itemDragEndId = 0;
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]