Commit fcb6e621 authored by Giulio Camuffo's avatar Giulio Camuffo
Browse files

Pass the relevant serial when setting the selection


This fixes copying in Weston.

Change-Id: Icbdb81078e8df4575bbe440321773131ba27ebbf
Reviewed-by: default avatarLaszlo Agocs <laszlo.agocs@digia.com>
Showing with 3 additions and 2 deletions
......@@ -60,6 +60,7 @@
QWaylandDataDevice::QWaylandDataDevice(QWaylandDataDeviceManager *manager, QWaylandInputDevice *inputDevice)
: QtWayland::wl_data_device(manager->get_data_device(inputDevice->wl_seat()))
, m_display(manager->display())
, m_inputDevice(inputDevice)
, m_enterSerial(0)
, m_dragWindow(0)
, m_dragPoint()
......@@ -92,7 +93,7 @@ void QWaylandDataDevice::setSelectionSource(QWaylandDataSource *source)
m_selectionSource.reset(source);
if (source)
connect(source, &QWaylandDataSource::cancelled, this, &QWaylandDataDevice::selectionSourceCancelled);
set_selection(source ? source->object() : 0, 0 /* TODO m_display->serial() */);
set_selection(source ? source->object() : Q_NULLPTR, m_inputDevice->serial());
}
QWaylandDataOffer *QWaylandDataDevice::dragOffer() const
......
......@@ -88,7 +88,7 @@ private Q_SLOTS:
private:
QWaylandDisplay *m_display;
QWaylandInputDevice *m_inputDevice;
uint32_t m_enterSerial;
QWindow *m_dragWindow;
QPoint m_dragPoint;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment