[gnome-shell] Ensure our drag actor is positioned over the cursor



commit 7d8c3f1ecdd761d9d20ee8db459481675aaf2eaf
Author: Colin Walters <walters verbum org>
Date:   Tue Mar 9 19:15:43 2010 -0500

    Ensure our drag actor is positioned over the cursor
    
    Previously we were looking at the source size, which is
    not necessarily the same as the drag actor size.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=607821

 js/ui/dnd.js |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/dnd.js b/js/ui/dnd.js
index 717ea18..4ce2a0b 100644
--- a/js/ui/dnd.js
+++ b/js/ui/dnd.js
@@ -154,10 +154,9 @@ _Draggable.prototype = {
                 // the dragActor over it. Otherwise, center it
                 // around the pointer
                 let [sourceX, sourceY] = this._dragActorSource.get_transformed_position();
-                let [sourceWidth, sourceHeight] = this._dragActorSource.get_transformed_size();
                 let x, y;
-                if (stageX > sourceX && stageX <= sourceX + sourceWidth &&
-                    stageY > sourceY && stageY <= sourceY + sourceHeight) {
+                if (stageX > sourceX && stageX <= sourceX + this._dragActor.width &&
+                    stageY > sourceY && stageY <= sourceY + this._dragActor.height) {
                     x = sourceX;
                     y = sourceY;
                 } else {



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