From 061ed4599dd2b384e4ef74b297640bf4e92f7f43 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Thu, 2 Jun 2016 15:53:02 +0200 Subject: qwindow-compositor: remove drag icon before dropping Change-Id: Ief93b5e79d3a51e4d20387357ad2abe15bf1a695 Reviewed-by: Giulio Camuffo --- examples/wayland/qwindow-compositor/compositor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3