From 1e1785c8d2b077c34a8ca1d4f93e5a75b269eac8 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Thu, 16 Mar 2017 13:59:20 +0100 Subject: 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 Reviewed-by: Johan Helsing --- src/client/qwaylandwindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/client/qwaylandwindow.cpp') diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index dec4d1157..00fbb00de 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -40,7 +40,6 @@ #include "qwaylandwindow_p.h" #include "qwaylandbuffer_p.h" -#include "qwaylanddatadevice_p.h" #include "qwaylanddisplay_p.h" #include "qwaylandinputdevice_p.h" #include "qwaylandscreen_p.h" @@ -54,6 +53,11 @@ #include "qwaylanddecorationfactory_p.h" #include "qwaylandshmbackingstore_p.h" +#if QT_CONFIG(wayland_datadevice) +#include "qwaylanddatadevice_p.h" +#endif + + #include #include #include @@ -825,7 +829,7 @@ void QWaylandWindow::requestActivateWindow() void QWaylandWindow::unfocus() { -#if QT_CONFIG(draganddrop) +#if QT_CONFIG(clipboard) QWaylandInputDevice *inputDevice = mDisplay->currentInputDevice(); if (inputDevice && inputDevice->dataDevice()) { inputDevice->dataDevice()->invalidateSelectionOffer(); -- cgit v1.2.3