[gnome-shell/wip/carlosg/spurious-window-drags: 4/4] dnd: Start implicit DnD from the original drag position




commit dbb853b1bbfe72b99fc0da99f6e4709adddd1efd
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Oct 5 12:19:14 2022 +0200

    dnd: Start implicit DnD from the original drag position
    
    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.

 js/ui/dnd.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/dnd.js b/js/ui/dnd.js
index 125024204c..a960d720b8 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;


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