summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/wayland/qwindow-compositor/compositor.cpp4
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,