summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddnd.cpp
diff options
context:
space:
mode:
authorErik Larsson <erik@ortogonal.com>2016-04-17 20:34:21 +0200
committerErik Larsson <erik@ortogonal.com>2016-04-21 11:12:43 +0000
commitfb417c301cace4825d13e818e4e7e4e1b966c630 (patch)
tree77a4f0e62cb581b3997c19684ea465ce30a8aa98 /src/client/qwaylanddnd.cpp
parenta1b8e326e45edbf7d373d4d44bdecad13562efa4 (diff)
Move drag icon relative the cursor hotspot position
Instead of placing the drag icons top-left corner at the cursors hotspot the drag icon is moved so it will be placed correct relative the cursor hotspot. This will makes the drag feeling more realistic. Change-Id: I8d60ae1b7788accb9034575983417abae4c58c1a Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src/client/qwaylanddnd.cpp')
-rw-r--r--src/client/qwaylanddnd.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/client/qwaylanddnd.cpp b/src/client/qwaylanddnd.cpp
index a84b749e6..b59ac6d70 100644
--- a/src/client/qwaylanddnd.cpp
+++ b/src/client/qwaylanddnd.cpp
@@ -74,6 +74,7 @@ void QWaylandDrag::startDrag()
QBasicDrag::startDrag();
QWaylandWindow *icon = static_cast<QWaylandWindow *>(shapedPixmapWindow()->handle());
m_display->currentInputDevice()->dataDevice()->startDrag(drag()->mimeData(), icon);
+ icon->addAttachOffset(-drag()->hotSpot());
}
void QWaylandDrag::cancel()