summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylanddisplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylanddisplay.cpp')
-rw-r--r--src/plugins/platforms/wayland/qwaylanddisplay.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp
index 876b46a..974453d 100644
--- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp
+++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp
@@ -45,6 +45,7 @@
#include "qwaylandscreen.h"
#include "qwaylandcursor.h"
#include "qwaylandinputdevice.h"
+#include "qwaylandclipboard.h"
#ifdef QT_WAYLAND_GL_SUPPORT
#include "gl_integration/qwaylandglintegration.h"
@@ -52,6 +53,7 @@
#include <QtCore/QAbstractEventDispatcher>
#include <QtGui/QApplication>
+#include <QtGui/private/qapplication_p.h>
#include <unistd.h>
#include <fcntl.h>
@@ -249,7 +251,6 @@ void QWaylandDisplay::displayHandleGlobal(uint32_t id,
uint32_t version)
{
Q_UNUSED(version);
-
if (interface == "wl_output") {
struct wl_output *output = wl_output_create(mDisplay, id, 1);
wl_output_add_listener(output, &outputListener, this);
@@ -264,5 +265,9 @@ void QWaylandDisplay::displayHandleGlobal(uint32_t id,
QWaylandInputDevice *inputDevice =
new QWaylandInputDevice(mDisplay, id);
mInputDevices.append(inputDevice);
+ } else if (interface == "wl_selection_offer") {
+ QPlatformIntegration *plat = QApplicationPrivate::platformIntegration();
+ QWaylandClipboard *clipboard = static_cast<QWaylandClipboard *>(plat->clipboard());
+ clipboard->createSelectionOffer(id);
}
}