Pass the relevant serial when setting the selection

This fixes copying in Weston.

Change-Id: Icbdb81078e8df4575bbe440321773131ba27ebbf
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
Giulio Camuffo 2014-10-05 20:45:34 +03:00
parent 838501541a
commit eac16a7b28
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -88,7 +88,7 @@ private Q_SLOTS:
private:
QWaylandDisplay *m_display;
QWaylandInputDevice *m_inputDevice;
uint32_t m_enterSerial;
QWindow *m_dragWindow;
QPoint m_dragPoint;