diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2017-03-16 13:59:20 +0100 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2017-03-23 13:37:00 +0000 |
commit | 1e1785c8d2b077c34a8ca1d4f93e5a75b269eac8 (patch) | |
tree | a4264362c3ef1b070da05ab46edab612d53501dc /src/client/qwaylanddisplay.cpp | |
parent | dfcda81c5b13ad15517a37bcc45f3bf5f550466c (diff) |
Clean up draganddrop and clipboard features
Don't assume that no-draganddrop implies no-clipboard. Introduce
a new private feature wayland-datadevice which contains the
common functionality. This feature cannot be controlled independently,
but is automatically disabled when both clipboard and draganddrop are
disabled.
Change-Id: I6aac09c7ee524e3b11f0a1caa4a6c62fc3f1d10f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index 83a69483..86cfe1a0 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -47,7 +47,9 @@ #if QT_CONFIG(clipboard) #include "qwaylandclipboard_p.h" #endif +#if QT_CONFIG(wayland_datadevice) #include "qwaylanddatadevicemanager_p.h" +#endif #include "qwaylandhardwareintegration_p.h" #include "qwaylandxdgshell_p.h" #include "qwaylandxdgsurface_p.h" @@ -122,7 +124,7 @@ QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration() co QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration) : mWaylandIntegration(waylandIntegration) -#if QT_CONFIG(draganddrop) +#if QT_CONFIG(wayland_datadevice) , mDndSelectionHandler(0) #endif , mWindowExtension(0) @@ -162,7 +164,7 @@ QWaylandDisplay::~QWaylandDisplay(void) mWaylandIntegration->destroyScreen(screen); } mScreens.clear(); -#if QT_CONFIG(draganddrop) +#if QT_CONFIG(wayland_datadevice) delete mDndSelectionHandler.take(); #endif wl_display_disconnect(mDisplay); @@ -257,7 +259,7 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin } else if (interface == QStringLiteral("wl_seat")) { QWaylandInputDevice *inputDevice = mWaylandIntegration->createInputDevice(this, version, id); mInputDevices.append(inputDevice); -#if QT_CONFIG(draganddrop) +#if QT_CONFIG(wayland_datadevice) } else if (interface == QStringLiteral("wl_data_device_manager")) { mDndSelectionHandler.reset(new QWaylandDataDeviceManager(this, id)); #endif |