summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylanddrag.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-07-06 14:33:53 +0200
committerJohan Helsing <johan.helsing@qt.io>2016-07-11 07:45:24 +0000
commit28bee1e6b4bec3e9ea952de132530e9409463684 (patch)
tree035411e3f5b6908534136e9e2e8f533ced120838 /src/compositor/compositor_api/qwaylanddrag.cpp
parenta8a3573eb4bfa59bad6aa9b2ceef4393b39f0792 (diff)
Fix drag-and-drop for QML compositors
Dragging within the same client was broken because handleStartDrag called setInputEventsEnabled(false), which meant the surface was ignored as a target for the drag. With this change, input events are not disabled, and wl_data_device.motion events are sent to the source surface like they should. Also wl_pointer.leave and enter are sent before and after the drag. Change-Id: Ife46ca3a9d44a660a5cf029093842adb0e3eca7c Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Diffstat (limited to 'src/compositor/compositor_api/qwaylanddrag.cpp')
-rw-r--r--src/compositor/compositor_api/qwaylanddrag.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylanddrag.cpp b/src/compositor/compositor_api/qwaylanddrag.cpp
index 226047969..26b1140bf 100644
--- a/src/compositor/compositor_api/qwaylanddrag.cpp
+++ b/src/compositor/compositor_api/qwaylanddrag.cpp
@@ -88,6 +88,12 @@ QWaylandSurface *QWaylandDrag::origin() const
return dataDevice ? dataDevice->dragOrigin() : nullptr;
}
+QWaylandInputDevice *QWaylandDrag::inputDevice() const
+{
+ Q_D(const QWaylandDrag);
+ return d->inputDevice;
+}
+
bool QWaylandDrag::visible() const
{