[gnome-shell] dnd: Don't queue an idle handler if we already have one



commit fce2930b859af8530c4fed9f258e8186649455d2
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Nov 6 18:22:47 2013 +0100

    dnd: Don't queue an idle handler if we already have one
    
    Removing an existing source before scheduling a new one is not wrong,
    but slightly less effective than doing nothing and relying on the
    previously created source to do the job.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711555

 js/ui/dnd.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/dnd.js b/js/ui/dnd.js
index 8172ac5..042cd19 100644
--- a/js/ui/dnd.js
+++ b/js/ui/dnd.js
@@ -391,7 +391,7 @@ const _Draggable = new Lang.Class({
 
     _queueUpdateDragHover: function() {
         if (this._updateHoverId)
-            GLib.source_remove(this._updateHoverId);
+            return;
 
         this._updateHoverId = GLib.idle_add(GLib.PRIORITY_DEFAULT,
                                             Lang.bind(this, this._updateDragHover));


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