[gnome-shell] dnd: Remove the queue updated ID for completed drags as well



commit 744749f2f3660d43a2eea3d905fafa7229dc9623
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Sep 11 15:09:09 2013 -0400

    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

 js/ui/dnd.js |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/dnd.js b/js/ui/dnd.js
index 411a1d6..6752eb3 100644
--- a/js/ui/dnd.js
+++ b/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;
     }


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