wayland: Don't allow to drop onto itself

It was showing the drop indicators in the window being dragged
This commit is contained in:
Sergio Martins
2020-10-15 16:48:35 +01:00
parent e3de2df69c
commit ac001d6f32
3 changed files with 17 additions and 0 deletions

View File

@@ -350,6 +350,11 @@ bool StateDraggingWayland::handleDragEnter(QDragEnterEvent *ev, DropArea *dropAr
if (!mimeData)
return false; // Not for us, some other user drag.
if (q->m_windowBeingDragged && q->m_windowBeingDragged->contains(dropArea)) {
ev->ignore();
return true;
}
dropArea->hover(q->m_windowBeingDragged.get(), ev->pos());
ev->accept();