summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2022-10-05 12:19:14 +0200
committerCarlos Garnacho <carlosg@gnome.org>2022-10-05 12:32:09 +0200
commitdbb853b1bbfe72b99fc0da99f6e4709adddd1efd (patch)
tree577177a737825a1fcb4cbbf5932949b2f3624fc0
parent660f445b972a38b6bda0f8132b99c56899fd7328 (diff)
downloadgnome-shell-wip/carlosg/spurious-window-drags.tar.gz
dnd: Start implicit DnD from the original drag positionwip/carlosg/spurious-window-drags
Locking the DnD actor to the pointer coordinates at the time of starting a drag (e.g. after the DnD threshold) is going to look like it lags behind. Start the DnD operation at the button/touch press coordinates, so the actor looks like it snaps to that position instead of being dragged from there.
-rw-r--r--js/ui/dnd.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/ui/dnd.js b/js/ui/dnd.js
index 125024204..a960d720b 100644
--- a/js/ui/dnd.js
+++ b/js/ui/dnd.js
@@ -501,7 +501,7 @@ var _Draggable = class _Draggable extends Signals.EventEmitter {
// Pointer devices (e.g. mouse) start the drag immediately
if (isPointerOrTouchpad || ellapsedTime > this._dragTimeoutThreshold) {
- this.startDrag(stageX, stageY, event.get_time(), this._touchSequence, event.get_device());
+ this.startDrag(this._dragStartX, this._dragStartY, event.get_time(), this._touchSequence, event.get_device());
this._updateDragPosition(event);
} else {
this._dragThresholdIgnored = true;