From 7d8c3f1ecdd761d9d20ee8db459481675aaf2eaf Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 9 Mar 2010 19:15:43 -0500 Subject: [PATCH] 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 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 717ea18bd..4ce2a0bf7 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 {