Client: Connect drags being accepted to updating the source drag icon

Currently in a multi-process drag and drop when the other client accepts
a given mimetype for dropping it calls accept, which is received by the
client, but the drag cursor is never updated.

Instead the drag cursor was updated in the data_device_enter events
which only works if we are operating within one process.

The code existed to handle this existed but both the targetChanged
signal and the dragSourceTargetChanged were unused.

Change-Id: I443f31f1b2ef72d4b5eadaf7115f97544dac883a
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
David Edmundson 2021-02-09 16:09:21 +00:00
parent 9e9e338679
commit 487d305d2b

View File

@ -124,6 +124,7 @@ bool QWaylandDataDevice::startDrag(QMimeData *mimeData, QWaylandWindow *icon)
m_dragSource.reset(new QWaylandDataSource(m_display->dndSelectionHandler(), mimeData)); m_dragSource.reset(new QWaylandDataSource(m_display->dndSelectionHandler(), mimeData));
connect(m_dragSource.data(), &QWaylandDataSource::cancelled, this, &QWaylandDataDevice::dragSourceCancelled); connect(m_dragSource.data(), &QWaylandDataSource::cancelled, this, &QWaylandDataDevice::dragSourceCancelled);
connect(m_dragSource.data(), &QWaylandDataSource::targetChanged, this, &QWaylandDataDevice::dragSourceTargetChanged);
start_drag(m_dragSource->object(), origin->wlSurface(), icon->wlSurface(), m_display->currentInputDevice()->serial()); start_drag(m_dragSource->object(), origin->wlSurface(), icon->wlSurface(), m_display->currentInputDevice()->serial());
return true; return true;