Commit 56f159dd authored by David Edmundson's avatar David Edmundson
Browse files

Adapt to DataSource changes

parent 3694580e
......@@ -388,7 +388,6 @@ bool WaylandServer::init(const QByteArray &socketName, InitializationFlags flags
m_display->createPointerGestures(PointerGesturesInterfaceVersion::UnstableV1, m_display)->create();
m_display->createPointerConstraints(PointerConstraintsInterfaceVersion::UnstableV1, m_display)->create();
m_dataDeviceManager = m_display->createDataDeviceManager(m_display);
m_dataDeviceManager->create();
m_display->createDataControlDeviceManagerV1(m_display);
m_display->createPrimarySelectionDeviceManagerV1(m_display);
m_idle = m_display->createIdle(m_display);
......
......@@ -83,7 +83,7 @@ void Clipboard::wlSelectionChanged(KWaylandServer::AbstractDataSource *dsi)
bool Clipboard::ownsSelection(KWaylandServer::AbstractDataSource *dsi) const
{
return dsi->client() == DataBridge::self()->dataDeviceIface()->client()->client();
return dsi->client() == DataBridge::self()->dataDeviceIface()->client();
}
void Clipboard::checkWlSource()
......@@ -105,7 +105,7 @@ void Clipboard::checkWlSource()
// Otherwise the Wayland source gets destroyed to shield
// against snooping X clients.
if (!dsi || (DataBridge::self()->dataDeviceIface()->client()->client() == dsi->client())) {
if (!dsi || (DataBridge::self()->dataDeviceIface()->client() == dsi->client())) {
// Xwayland source or no source
disconnect(m_checkConnection);
m_checkConnection = QMetaObject::Connection();
......
......@@ -21,6 +21,7 @@
#include <KWayland/Client/datadevicemanager.h>
#include <KWayland/Client/seat.h>
#include <KWaylandServer/clientconnection.h>
#include <KWaylandServer/datadevicemanager_interface.h>
#include <KWaylandServer/datadevice_interface.h>
#include <KWaylandServer/seat_interface.h>
......@@ -58,7 +59,7 @@ DataBridge::DataBridge(QObject *parent)
if (m_dataDeviceInterface) {
return;
}
if (dataDeviceInterface->client() != waylandServer()->internalConnection()) {
if (dataDeviceInterface->client() != *waylandServer()->internalConnection()) {
return;
}
QObject::disconnect(*dc);
......
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