diff options
author | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2014-10-05 20:45:34 +0300 |
---|---|---|
committer | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2014-10-09 14:27:07 +0200 |
commit | fcb6e62109abc3660b05117781526ed9957c2e45 (patch) | |
tree | a3ee3e78b677155a37f96d8c7df6ac39b2ec99bb | |
parent | bbd4a8f85b2e0ddaa94458569b8b5aa4128c52b1 (diff) |
Pass the relevant serial when setting the selection
This fixes copying in Weston.
Change-Id: Icbdb81078e8df4575bbe440321773131ba27ebbf
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
-rw-r--r-- | src/client/qwaylanddatadevice.cpp | 3 | ||||
-rw-r--r-- | src/client/qwaylanddatadevice_p.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp index 74f879f97..83e74ce6c 100644 --- a/src/client/qwaylanddatadevice.cpp +++ b/src/client/qwaylanddatadevice.cpp @@ -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 diff --git a/src/client/qwaylanddatadevice_p.h b/src/client/qwaylanddatadevice_p.h index dae91290e..ef82d84dd 100644 --- a/src/client/qwaylanddatadevice_p.h +++ b/src/client/qwaylanddatadevice_p.h @@ -88,7 +88,7 @@ private Q_SLOTS: private: QWaylandDisplay *m_display; - + QWaylandInputDevice *m_inputDevice; uint32_t m_enterSerial; QWindow *m_dragWindow; QPoint m_dragPoint; |