diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2016-06-02 15:53:02 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2016-08-11 07:30:07 +0000 |
commit | 061ed4599dd2b384e4ef74b297640bf4e92f7f43 (patch) | |
tree | daf913d9bd133ee7e9b1fc4f8434d24fd6013f1a | |
parent | 0a8ff3b31bd1cf4d0d0de48362b7d8b9b8a7ed5c (diff) |
qwindow-compositor: remove drag icon before dropping
Change-Id: Ief93b5e79d3a51e4d20387357ad2abe15bf1a695
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
-rw-r--r-- | examples/wayland/qwindow-compositor/compositor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/wayland/qwindow-compositor/compositor.cpp b/examples/wayland/qwindow-compositor/compositor.cpp index 065a6bfae..c60ecc6b5 100644 --- a/examples/wayland/qwindow-compositor/compositor.cpp +++ b/examples/wayland/qwindow-compositor/compositor.cpp @@ -456,8 +456,10 @@ void Compositor::handleDrag(View *target, QMouseEvent *me) } QWaylandDrag *currentDrag = defaultInputDevice()->drag(); currentDrag->dragMove(surface, pos); - if (me->buttons() == Qt::NoButton) + if (me->buttons() == Qt::NoButton) { + m_views.removeOne(findView(currentDrag->icon())); currentDrag->drop(); + } } // We only have a flat list of views, plus pointers from child to parent, |