summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features/wayland-scanner-client-wayland-protocol-include.prf53
-rw-r--r--src/client/client.pro4
-rw-r--r--src/client/qwaylandabstractdecoration_p.h2
-rw-r--r--src/client/qwaylandbuffer_p.h3
-rw-r--r--src/client/qwaylanddisplay_p.h2
-rw-r--r--src/client/qwaylandextendedsurface_p.h1
-rw-r--r--src/client/qwaylandinputcontext_p.h3
-rw-r--r--src/client/qwaylandinputdevice_p.h2
-rw-r--r--src/client/qwaylandshellsurface_p.h2
-rw-r--r--src/client/qwaylandshmbackingstore.cpp3
-rw-r--r--src/client/qwaylandsubsurface_p.h2
-rw-r--r--src/client/qwaylandwindowmanagerintegration_p.h1
-rw-r--r--src/compositor/compositor_api/qwaylandclient.cpp2
-rw-r--r--src/compositor/compositor_api/qwaylanddestroylistener_p.h2
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.cpp2
-rw-r--r--src/compositor/extensions/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-server-protocol_p.h2
-rw-r--r--src/compositor/extensions/qwaylandwlshell_p.h2
-rw-r--r--src/compositor/global/qwaylandcompositorextension.cpp2
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegration_p.h2
-rw-r--r--src/compositor/wayland_wrapper/qwlclientbuffer.cpp2
-rw-r--r--src/compositor/wayland_wrapper/qwlclientbuffer_p.h2
-rw-r--r--src/compositor/wayland_wrapper/wayland_wrapper.pri4
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h2
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp1
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h2
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h5
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp2
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h5
-rw-r--r--src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp1
-rw-r--r--src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri2
-rw-r--r--src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h2
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h1
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5.cpp1
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-client-protocol_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgpopupv5_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h2
-rw-r--r--src/qtwaylandscanner/qtwaylandscanner.cpp17
-rw-r--r--tests/auto/client/shared/mockcompositor.h3
-rw-r--r--tests/auto/compositor/compositor/compositor.pro1
-rw-r--r--tests/auto/compositor/compositor/mockclient.h2
-rw-r--r--tests/auto/compositor/compositor/mockkeyboard.h2
-rw-r--r--tests/auto/compositor/compositor/mockpointer.h2
-rw-r--r--tests/auto/compositor/compositor/mockseat.h2
-rw-r--r--tests/auto/compositor/compositor/testcompositor.cpp2
52 files changed, 110 insertions, 67 deletions
diff --git a/features/wayland-scanner-client-wayland-protocol-include.prf b/features/wayland-scanner-client-wayland-protocol-include.prf
new file mode 100644
index 000000000..9c5d2d1ed
--- /dev/null
+++ b/features/wayland-scanner-client-wayland-protocol-include.prf
@@ -0,0 +1,53 @@
+# Special version of WAYLANDCLIENTSOURCES to be used with protocols that
+# have requests that create objects with interfaces defined in the core
+# wayland protocol.
+#
+# E.g. the xcomposite protocol has a request which creates a wl_buffer. With
+# the regular wayland-scanner.prf compilation would fail because
+# wl_buffer_interface is not defined.
+#
+# This version solves the problem by prepending
+# #include <QtWaylandClient/private/wayland-wayland-client-protocol.h>
+# to the wayland-scanner generated files.
+
+isEmpty(QMAKE_WAYLAND_SCANNER):error("QMAKE_WAYLAND_SCANNER not defined for this mkspec")
+
+!isEmpty(MODULE_INCNAME) {
+ WAYLAND_INCLUDE_DIR = $$MODULE_INCNAME/private
+}
+
+wayland_client_header.name = wayland ${QMAKE_FILE_BASE}
+wayland_client_header.input = WAYLANDCLIENTSOURCES
+wayland_client_header.variable_out = HEADERS
+wayland_client_header.output = wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
+# XXX: Prepend the necessary include in the generated header
+wayland_client_header.commands = echo \"$${LITERAL_HASH}include <QtWaylandClient/private/wayland-wayland-client-protocol.h>\" > ${QMAKE_FILE_OUT} && $$QMAKE_WAYLAND_SCANNER --include-core-only client-header < ${QMAKE_FILE_IN} >> ${QMAKE_FILE_OUT}
+QMAKE_EXTRA_COMPILERS += wayland_client_header
+
+wayland_code.name = wayland ${QMAKE_FILE_BASE}
+wayland_code.input = WAYLANDCLIENTSOURCES
+wayland_code.variable_out = SOURCES
+wayland_code.output = wayland-${QMAKE_FILE_BASE}-protocol.c
+wayland_code.commands = $$QMAKE_WAYLAND_SCANNER --include-core-only code < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+silent:wayland_code.commands = @echo Wayland code header ${QMAKE_FILE_IN} && $$wayland_code.commands
+QMAKE_EXTRA_COMPILERS += wayland_code
+
+qtPrepareTool(QMAKE_QTWAYLANDSCANNER, qtwaylandscanner)
+
+qtwayland_client_header.name = qtwayland ${QMAKE_FILE_BASE}
+qtwayland_client_header.input = WAYLANDCLIENTSOURCES
+qtwayland_client_header.variable_out = HEADERS
+qtwayland_client_header.depends += $$QMAKE_QTWAYLANDSCANNER_EXE wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
+qtwayland_client_header.output = qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
+qtwayland_client_header.commands = $$QMAKE_QTWAYLANDSCANNER client-header ${QMAKE_FILE_IN} $$WAYLAND_INCLUDE_DIR > ${QMAKE_FILE_OUT}
+silent:qtwayland_client_header.commands = @echo QtWayland client header ${QMAKE_FILE_IN} && $$qtwayland_client_header.commands
+QMAKE_EXTRA_COMPILERS += qtwayland_client_header
+
+qtwayland_client_code.name = qtwayland ${QMAKE_FILE_BASE}
+qtwayland_client_code.input = WAYLANDCLIENTSOURCES
+qtwayland_client_code.variable_out = SOURCES
+qtwayland_client_code.depends += $$QMAKE_QTWAYLANDSCANNER_EXE qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
+qtwayland_client_code.output = qwayland-${QMAKE_FILE_BASE}.cpp
+qtwayland_client_code.commands = $$QMAKE_QTWAYLANDSCANNER client-code ${QMAKE_FILE_IN} $$WAYLAND_INCLUDE_DIR > ${QMAKE_FILE_OUT}
+silent:qtwayland_client_code.commands = @echo QtWayland client code ${QMAKE_FILE_IN} && $$qtwayland_client_code.commands
+QMAKE_EXTRA_COMPILERS += qtwayland_client_code
diff --git a/src/client/client.pro b/src/client/client.pro
index 45bbb976b..d65866e61 100644
--- a/src/client/client.pro
+++ b/src/client/client.pro
@@ -29,9 +29,7 @@ WAYLANDCLIENTSOURCES += \
../extensions/qt-windowmanager.xml \
../3rdparty/protocol/text-input-unstable-v2.xml \
../3rdparty/protocol/xdg-output-unstable-v1.xml \
-
-WAYLANDCLIENTSOURCES_SYSTEM += \
- ../3rdparty/protocol/wayland.xml \
+ ../3rdparty/protocol/wayland.xml
SOURCES += qwaylandintegration.cpp \
qwaylandnativeinterface.cpp \
diff --git a/src/client/qwaylandabstractdecoration_p.h b/src/client/qwaylandabstractdecoration_p.h
index d1b11928a..f5b1854dd 100644
--- a/src/client/qwaylandabstractdecoration_p.h
+++ b/src/client/qwaylandabstractdecoration_p.h
@@ -61,8 +61,6 @@
#include <QtGui/QImage>
#include <QtWaylandClient/qtwaylandclientglobal.h>
-#include <wayland-client.h>
-
#include <QtCore/QDebug>
QT_BEGIN_NAMESPACE
diff --git a/src/client/qwaylandbuffer_p.h b/src/client/qwaylandbuffer_p.h
index eea090f35..945f1279a 100644
--- a/src/client/qwaylandbuffer_p.h
+++ b/src/client/qwaylandbuffer_p.h
@@ -56,8 +56,7 @@
#include <QtCore/QSize>
#include <QtCore/QRect>
-#include <wayland-client.h>
-#include <wayland-client-protocol.h>
+#include <QtWaylandClient/private/wayland-wayland-client-protocol.h>
QT_BEGIN_NAMESPACE
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h
index 0dd8d7aff..d03ea294a 100644
--- a/src/client/qwaylanddisplay_p.h
+++ b/src/client/qwaylanddisplay_p.h
@@ -59,8 +59,6 @@
#include <QtCore/QWaitCondition>
#include <QtCore/QLoggingCategory>
-#include <wayland-client.h>
-
#include <QtWaylandClient/private/qwayland-wayland.h>
#include <QtWaylandClient/private/qtwaylandclientglobal_p.h>
#include <QtWaylandClient/private/qwaylandshm_p.h>
diff --git a/src/client/qwaylandextendedsurface_p.h b/src/client/qwaylandextendedsurface_p.h
index cd604f342..d71ac6be9 100644
--- a/src/client/qwaylandextendedsurface_p.h
+++ b/src/client/qwaylandextendedsurface_p.h
@@ -56,7 +56,6 @@
#include <QtWaylandClient/qtwaylandclientglobal.h>
-#include <wayland-client.h>
#include <QtWaylandClient/private/qwayland-surface-extension.h>
QT_BEGIN_NAMESPACE
diff --git a/src/client/qwaylandinputcontext_p.h b/src/client/qwaylandinputcontext_p.h
index 93300e1f5..10132dfe1 100644
--- a/src/client/qwaylandinputcontext_p.h
+++ b/src/client/qwaylandinputcontext_p.h
@@ -62,6 +62,9 @@
#include <QtWaylandClient/private/qwayland-text-input-unstable-v2.h>
#include <qwaylandinputmethodeventbuilder_p.h>
+struct wl_callback;
+struct wl_callback_listener;
+
QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(qLcQpaInputMethods)
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h
index 4b12cc089..e1f0f5070 100644
--- a/src/client/qwaylandinputdevice_p.h
+++ b/src/client/qwaylandinputdevice_p.h
@@ -61,8 +61,6 @@
#include <qpa/qplatformscreen.h>
#include <qpa/qwindowsysteminterface.h>
-#include <wayland-client.h>
-
#include <QtWaylandClient/private/qwayland-wayland.h>
#if QT_CONFIG(xkbcommon_evdev)
diff --git a/src/client/qwaylandshellsurface_p.h b/src/client/qwaylandshellsurface_p.h
index f034e1bdb..f683d9e01 100644
--- a/src/client/qwaylandshellsurface_p.h
+++ b/src/client/qwaylandshellsurface_p.h
@@ -54,8 +54,6 @@
#include <QtCore/QSize>
#include <QObject>
-#include <wayland-client.h>
-
#include <QtWaylandClient/private/qwayland-wayland.h>
#include <QtWaylandClient/qtwaylandclientglobal.h>
diff --git a/src/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp
index ecb03c0d6..8cc9598fa 100644
--- a/src/client/qwaylandshmbackingstore.cpp
+++ b/src/client/qwaylandshmbackingstore.cpp
@@ -49,8 +49,7 @@
#include <QtGui/QPainter>
#include <QMutexLocker>
-#include <wayland-client.h>
-#include <wayland-client-protocol.h>
+#include <QtWaylandClient/private/wayland-wayland-client-protocol.h>
#include <unistd.h>
#include <sys/mman.h>
diff --git a/src/client/qwaylandsubsurface_p.h b/src/client/qwaylandsubsurface_p.h
index e9a7cb20e..76da10b24 100644
--- a/src/client/qwaylandsubsurface_p.h
+++ b/src/client/qwaylandsubsurface_p.h
@@ -51,8 +51,6 @@
// We mean it.
//
-#include <wayland-client.h>
-
#include <QtCore/qglobal.h>
#include <QtCore/qmutex.h>
diff --git a/src/client/qwaylandwindowmanagerintegration_p.h b/src/client/qwaylandwindowmanagerintegration_p.h
index 1319abd91..31de6ddd3 100644
--- a/src/client/qwaylandwindowmanagerintegration_p.h
+++ b/src/client/qwaylandwindowmanagerintegration_p.h
@@ -54,7 +54,6 @@
#include <QtCore/QObject>
#include <QtCore/QScopedPointer>
-#include <wayland-client.h>
#include <QtServiceSupport/private/qgenericunixservices_p.h>
#include <QtWaylandClient/private/qwayland-qt-windowmanager.h>
diff --git a/src/compositor/compositor_api/qwaylandclient.cpp b/src/compositor/compositor_api/qwaylandclient.cpp
index 7f0b225b2..d26dfc6d5 100644
--- a/src/compositor/compositor_api/qwaylandclient.cpp
+++ b/src/compositor/compositor_api/qwaylandclient.cpp
@@ -44,7 +44,7 @@
#include <QtWaylandCompositor/private/qwaylandcompositor_p.h>
-#include <wayland-server.h>
+#include <wayland-server-core.h>
#include <wayland-util.h>
QT_BEGIN_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylanddestroylistener_p.h b/src/compositor/compositor_api/qwaylanddestroylistener_p.h
index 7c6001c36..0bbeb69c0 100644
--- a/src/compositor/compositor_api/qwaylanddestroylistener_p.h
+++ b/src/compositor/compositor_api/qwaylanddestroylistener_p.h
@@ -55,7 +55,7 @@
#include <QtCore/private/qobject_p.h>
-#include <wayland-server.h>
+#include <wayland-server-core.h>
QT_BEGIN_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp
index e913a5a8b..19c0656c7 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.cpp
+++ b/src/compositor/compositor_api/qwaylandquickitem.cpp
@@ -64,7 +64,7 @@
#include <QtCore/QMutexLocker>
#include <QtCore/QMutex>
-#include <wayland-server.h>
+#include <wayland-server-core.h>
#include <QThread>
#ifndef GL_TEXTURE_EXTERNAL_OES
diff --git a/src/compositor/extensions/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-server-protocol_p.h b/src/compositor/extensions/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-server-protocol_p.h
index b979f048c..493fd52d4 100644
--- a/src/compositor/extensions/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-server-protocol_p.h
+++ b/src/compositor/extensions/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-server-protocol_p.h
@@ -6,7 +6,7 @@
#include <stdint.h>
#include <stddef.h>
-#include "wayland-server.h"
+#include "wayland-server-core.h"
#ifdef __cplusplus
extern "C" {
diff --git a/src/compositor/extensions/qwaylandwlshell_p.h b/src/compositor/extensions/qwaylandwlshell_p.h
index e8d568fce..f8a29bac8 100644
--- a/src/compositor/extensions/qwaylandwlshell_p.h
+++ b/src/compositor/extensions/qwaylandwlshell_p.h
@@ -46,7 +46,7 @@
#include <QtWaylandCompositor/QWaylandWlShellSurface>
#include <QtWaylandCompositor/QWaylandSeat>
-#include <wayland-server.h>
+#include <wayland-server-core.h>
#include <QHash>
#include <QPoint>
#include <QSet>
diff --git a/src/compositor/global/qwaylandcompositorextension.cpp b/src/compositor/global/qwaylandcompositorextension.cpp
index e50df48bd..912985399 100644
--- a/src/compositor/global/qwaylandcompositorextension.cpp
+++ b/src/compositor/global/qwaylandcompositorextension.cpp
@@ -44,7 +44,7 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
-#include <wayland-server.h>
+#include <wayland-server-core.h>
QT_BEGIN_NAMESPACE
diff --git a/src/compositor/hardware_integration/qwlclientbufferintegration_p.h b/src/compositor/hardware_integration/qwlclientbufferintegration_p.h
index 13a69fce9..7b458fbc2 100644
--- a/src/compositor/hardware_integration/qwlclientbufferintegration_p.h
+++ b/src/compositor/hardware_integration/qwlclientbufferintegration_p.h
@@ -55,7 +55,7 @@
#include <QtWaylandCompositor/qwaylandsurface.h>
#include <QtWaylandCompositor/qwaylandbufferref.h>
#include <QtCore/QSize>
-#include <wayland-server.h>
+#include <wayland-server-core.h>
QT_BEGIN_NAMESPACE
diff --git a/src/compositor/wayland_wrapper/qwlclientbuffer.cpp b/src/compositor/wayland_wrapper/qwlclientbuffer.cpp
index 7df9ead3c..cb1ee3da0 100644
--- a/src/compositor/wayland_wrapper/qwlclientbuffer.cpp
+++ b/src/compositor/wayland_wrapper/qwlclientbuffer.cpp
@@ -47,7 +47,7 @@
#include <QtCore/QDebug>
-#include <wayland-server-protocol.h>
+#include <QtWaylandCompositor/private/wayland-wayland-server-protocol.h>
#include "qwaylandsharedmemoryformathelper_p.h"
#include <QtWaylandCompositor/private/qwaylandcompositor_p.h>
diff --git a/src/compositor/wayland_wrapper/qwlclientbuffer_p.h b/src/compositor/wayland_wrapper/qwlclientbuffer_p.h
index ac8c1ed01..cd5c1e1d3 100644
--- a/src/compositor/wayland_wrapper/qwlclientbuffer_p.h
+++ b/src/compositor/wayland_wrapper/qwlclientbuffer_p.h
@@ -59,7 +59,7 @@
#include <QtWaylandCompositor/QWaylandSurface>
#include <QtWaylandCompositor/QWaylandBufferRef>
-#include <wayland-server.h>
+#include <wayland-server-core.h>
QT_BEGIN_NAMESPACE
diff --git a/src/compositor/wayland_wrapper/wayland_wrapper.pri b/src/compositor/wayland_wrapper/wayland_wrapper.pri
index e19ea253a..3e29fb100 100644
--- a/src/compositor/wayland_wrapper/wayland_wrapper.pri
+++ b/src/compositor/wayland_wrapper/wayland_wrapper.pri
@@ -1,6 +1,6 @@
CONFIG += wayland-scanner
-WAYLANDSERVERSOURCES_SYSTEM += \
- ../3rdparty/protocol/wayland.xml \
+WAYLANDSERVERSOURCES += \
+ ../3rdparty/protocol/wayland.xml
HEADERS += \
wayland_wrapper/qwlbuffermanager_p.h \
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
index 5e8a3bf46..9a614f58e 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
@@ -41,7 +41,7 @@
#define QWAYLANDBRCMEGLINTEGRATION_H
#include <QtWaylandClient/private/qwaylandclientbufferintegration_p.h>
-#include <wayland-client.h>
+#include <wayland-client-core.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp
index 5cd52f676..31adf100b 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp
@@ -50,7 +50,6 @@
#include <EGL/eglext_brcm.h>
-#include <wayland-client.h>
#include "wayland-brcm-client-protocol.h"
QT_BEGIN_NAMESPACE
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
index 4b3a635c7..e5f226d52 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
@@ -42,7 +42,7 @@
#include "qwaylandeglwindow.h"
#include "qwaylandglcontext.h"
-#include <wayland-client.h>
+#include <wayland-client-core.h>
#include <QtCore/QDebug>
#include <private/qeglconvenience_p.h>
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h
index 233ce78bd..e9998b832 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h
@@ -41,7 +41,7 @@
#define QWAYLANDEGLINCLUDE_H
#include <string.h>
-#include <wayland-client.h>
+#include <wayland-client-core.h>
#include <wayland-egl.h>
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp
index aa5367e02..104a4df91 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp
@@ -118,7 +118,7 @@ const struct qt_xcomposite_listener QWaylandXCompositeEGLClientBufferIntegration
QWaylandXCompositeEGLClientBufferIntegration::rootInformation
};
-void QWaylandXCompositeEGLClientBufferIntegration::wlDisplayHandleGlobal(void *data, wl_registry *registry, uint32_t id, const QString &interface, uint32_t version)
+void QWaylandXCompositeEGLClientBufferIntegration::wlDisplayHandleGlobal(void *data, ::wl_registry *registry, uint32_t id, const QString &interface, uint32_t version)
{
Q_UNUSED(version);
if (interface == "qt_xcomposite") {
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h
index ee55d6892..7037ee2d0 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h
@@ -41,7 +41,7 @@
#define QWAYLANDXCOMPOSITEEGLCLIENTBUFFERINTEGRATION_H
#include <QtWaylandClient/private/qwaylandclientbufferintegration_p.h>
-#include <wayland-client.h>
+#include <wayland-client-core.h>
#include <QtCore/QTextStream>
#include <QtCore/QDataStream>
@@ -64,6 +64,7 @@
struct qt_xcomposite;
struct qt_xcomposite_listener;
+struct wl_registry;
QT_BEGIN_NAMESPACE
@@ -100,7 +101,7 @@ private:
int mScreen;
Window mRootWindow;
- static void wlDisplayHandleGlobal(void *data, struct wl_registry *registry, uint32_t id,
+ static void wlDisplayHandleGlobal(void *data, struct ::wl_registry *registry, uint32_t id,
const QString &interface, uint32_t version);
static const struct ::qt_xcomposite_listener xcomposite_listener;
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp
index 090cfb8a0..8be47fa2e 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp
@@ -109,7 +109,7 @@ const struct qt_xcomposite_listener QWaylandXCompositeGLXIntegration::xcomposite
QWaylandXCompositeGLXIntegration::rootInformation
};
-void QWaylandXCompositeGLXIntegration::wlDisplayHandleGlobal(void *data, wl_registry *registry, uint32_t id, const QString &interface, uint32_t version)
+void QWaylandXCompositeGLXIntegration::wlDisplayHandleGlobal(void *data, ::wl_registry *registry, uint32_t id, const QString &interface, uint32_t version)
{
Q_UNUSED(version);
if (interface == "qt_xcomposite") {
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
index 26f2bad6f..809690816 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
@@ -41,7 +41,7 @@
#define QWAYLANDXCOMPOSITEGLXINTEGRATION_H
#include <QtWaylandClient/private/qwaylandclientbufferintegration_p.h>
-#include <wayland-client.h>
+#include <wayland-client-core.h>
#include <QtCore/QTextStream>
#include <QtCore/QDataStream>
@@ -59,6 +59,7 @@
struct qt_xcomposite;
struct qt_xcomposite_listener;
+struct wl_registry;
QT_BEGIN_NAMESPACE
@@ -93,7 +94,7 @@ private:
int mScreen = 0;
Window mRootWindow = 0;
- static void wlDisplayHandleGlobal(void *data, struct wl_registry *registry, uint32_t id,
+ static void wlDisplayHandleGlobal(void *data, struct ::wl_registry *registry, uint32_t id,
const QString &interface, uint32_t version);
static const struct qt_xcomposite_listener xcomposite_listener;
diff --git a/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp b/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp
index 5f1818cdf..33d9a6038 100644
--- a/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp
+++ b/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp
@@ -39,7 +39,6 @@
#include "qwaylandxcompositebuffer.h"
-#include <wayland-client.h>
#include "wayland-xcomposite-client-protocol.h"
QT_BEGIN_NAMESPACE
diff --git a/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri b/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri
index f255f5c57..a9120c261 100644
--- a/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri
+++ b/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri
@@ -1,7 +1,7 @@
INCLUDEPATH += $$PWD
QMAKE_USE += xcomposite
-CONFIG += wayland-scanner
+CONFIG += wayland-scanner-client-wayland-protocol-include
WAYLANDCLIENTSOURCES += $$PWD/../../../extensions/xcomposite.xml
HEADERS += \
diff --git a/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.cpp b/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.cpp
index 5a42c00dc..af9059603 100644
--- a/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.cpp
@@ -42,7 +42,7 @@
#include <QtGui/QOpenGLContext>
#include <QtGui/QOpenGLTexture>
#include <hybris/eglplatformcommon/hybris_nativebufferext.h>
-#include <wayland-server.h>
+#include <wayland-server-core.h>
QT_BEGIN_NAMESPACE
LibHybrisEglServerBuffer::LibHybrisEglServerBuffer(LibHybrisEglServerBufferIntegration *integration, const QImage &qimage, QtWayland::ServerBuffer::Format format)
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h b/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h
index bb43ed1af..28168994c 100644
--- a/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h
+++ b/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h
@@ -45,7 +45,7 @@
#include "xlibinclude.h"
#include "qwayland-server-xcomposite.h"
-#include <wayland-server.h>
+#include <wayland-server-core.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h b/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h
index 80a7507d4..3d76cc310 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h
@@ -51,7 +51,6 @@
// We mean it.
//
-#include <wayland-client.h>
#include <private/qwayland-wayland.h>
#include <QtWaylandClient/private/qwaylandshellintegration_p.h>
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
index 86305e4e5..324c10aac 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
@@ -53,8 +53,6 @@
#include <QtCore/QSize>
-#include <wayland-client.h>
-
#include <QtWaylandClient/qtwaylandclientglobal.h>
#include <QtWaylandClient/private/qwayland-wayland.h>
#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
diff --git a/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5.cpp b/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5.cpp
index 0115eb1da..51979acf7 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5.cpp
+++ b/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5.cpp
@@ -25,6 +25,7 @@
* DEALINGS IN THE SOFTWARE.
*/
#include "qwayland-xdg-shell-unstable-v5_p.h"
+#include <QtWaylandClient/private/wayland-wayland-client-protocol.h>
QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
diff --git a/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5_p.h b/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5_p.h
index 3d8a6c13d..8fb1ea7b8 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5_p.h
@@ -31,6 +31,8 @@
#include <QByteArray>
#include <QString>
+struct wl_registry;
+
QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
diff --git a/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-client-protocol_p.h b/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-client-protocol_p.h
index 46644610b..8877e8830 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-client-protocol_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-client-protocol_p.h
@@ -7,7 +7,7 @@
#include <stdint.h>
#include <stddef.h>
-#include "wayland-client.h"
+#include "wayland-client-core.h"
#ifdef __cplusplus
extern "C" {
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgpopupv5_p.h b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgpopupv5_p.h
index ff8e5639f..7494f6a67 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgpopupv5_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgpopupv5_p.h
@@ -53,8 +53,6 @@
#include "qwayland-xdg-shell-unstable-v5_p.h"
-#include <wayland-client.h>
-
#include <QtWaylandClient/qtwaylandclientglobal.h>
#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5_p.h b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5_p.h
index 67e5d32a7..2b0a59f17 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5_p.h
@@ -56,8 +56,6 @@
#include <QtCore/QSize>
#include <QtCore/QVector>
-#include <wayland-client.h>
-
#include <QtWaylandClient/qtwaylandclientglobal.h>
#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h
index 741366fb5..231a56d84 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h
@@ -59,8 +59,6 @@
#include <QtCore/QSize>
#include <QtCore/QMargins>
-#include <wayland-client.h>
-
QT_BEGIN_NAMESPACE
class QWindow;
diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
index c6e898121..c88d111d2 100644
--- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
@@ -60,8 +60,6 @@
#include <QtCore/QSize>
#include <QtGui/QRegion>
-#include <wayland-client.h>
-
QT_BEGIN_NAMESPACE
class QWindow;
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
index 591df9ddd..77d6ec828 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
@@ -62,8 +62,6 @@
#include <QtCore/QSize>
#include <QtGui/QRegion>
-#include <wayland-client.h>
-
QT_BEGIN_NAMESPACE
class QWindow;
diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp
index f2e2d24de..4494b7c62 100644
--- a/src/qtwaylandscanner/qtwaylandscanner.cpp
+++ b/src/qtwaylandscanner/qtwaylandscanner.cpp
@@ -440,7 +440,7 @@ bool Scanner::process()
printf("#ifndef %s\n", inclusionGuard.constData());
printf("#define %s\n", inclusionGuard.constData());
printf("\n");
- printf("#include \"wayland-server.h\"\n");
+ printf("#include \"wayland-server-core.h\"\n");
if (m_headerPath.isEmpty())
printf("#include \"wayland-%s-server-protocol.h\"\n", QByteArray(m_protocolName).replace('_', '-').constData());
else
@@ -938,6 +938,8 @@ bool Scanner::process()
printf("#include <QByteArray>\n");
printf("#include <QString>\n");
printf("\n");
+ printf("struct wl_registry;\n");
+ printf("\n");
printf("QT_BEGIN_NAMESPACE\n");
printf("QT_WARNING_PUSH\n");
printf("QT_WARNING_DISABLE_GCC(\"-Wmissing-field-initializers\")\n");
@@ -1055,6 +1057,17 @@ bool Scanner::process()
printf("QT_WARNING_DISABLE_GCC(\"-Wmissing-field-initializers\")\n");
printf("\n");
printf("namespace QtWayland {\n");
+ printf("\n");
+
+ // wl_registry_bind is part of the protocol, so we can't use that... instead we use core
+ // libwayland API to do the same thing a wayland-scanner generated wl_registry_bind would.
+ printf("static inline void *wlRegistryBind(struct ::wl_registry *registry, uint32_t name, const struct ::wl_interface *interface, uint32_t version)\n");
+ printf("{\n");
+ printf(" const uint32_t bindOpCode = 0;\n");
+ printf(" return (void *) wl_proxy_marshal_constructor_versioned((struct wl_proxy *) registry,\n");
+ printf(" bindOpCode, interface, version, name, interface->name, version, NULL);\n");
+ printf("}\n");
+ printf("\n");
for (int j = 0; j < interfaces.size(); ++j) {
const WaylandInterface &interface = interfaces.at(j);
@@ -1095,7 +1108,7 @@ bool Scanner::process()
printf(" void %s::init(struct ::wl_registry *registry, int id, int version)\n", interfaceName);
printf(" {\n");
- printf(" m_%s = static_cast<struct ::%s *>(wl_registry_bind(registry, id, &%s_interface, version));\n", interfaceName, interfaceName, interfaceName);
+ printf(" m_%s = static_cast<struct ::%s *>(wlRegistryBind(registry, id, &%s_interface, version));\n", interfaceName, interfaceName, interfaceName);
if (hasEvents)
printf(" init_listener();\n");
printf(" }\n");
diff --git a/tests/auto/client/shared/mockcompositor.h b/tests/auto/client/shared/mockcompositor.h
index 51b6f4bfb..b0d6b0885 100644
--- a/tests/auto/client/shared/mockcompositor.h
+++ b/tests/auto/client/shared/mockcompositor.h
@@ -34,7 +34,7 @@
#include <pthread.h>
#include <qglobal.h>
-#include <wayland-server.h>
+#include <wayland-server-core.h>
#include <QImage>
#include <QMutex>
@@ -121,7 +121,6 @@ private:
wl_display *m_display = nullptr;
wl_event_loop *m_loop = nullptr;
- wl_shm *m_shm = nullptr;
int m_fd = -1;
uint32_t m_time = 0;
diff --git a/tests/auto/compositor/compositor/compositor.pro b/tests/auto/compositor/compositor/compositor.pro
index d69db4ca5..29443f7a9 100644
--- a/tests/auto/compositor/compositor/compositor.pro
+++ b/tests/auto/compositor/compositor/compositor.pro
@@ -13,6 +13,7 @@ qtConfig(xkbcommon-evdev): \
WAYLANDCLIENTSOURCES += \
../../../../src/3rdparty/protocol/xdg-shell-unstable-v5.xml \
../../../../src/3rdparty/protocol/ivi-application.xml \
+ ../../../../src/3rdparty/protocol/wayland.xml
SOURCES += \
tst_compositor.cpp \
diff --git a/tests/auto/compositor/compositor/mockclient.h b/tests/auto/compositor/compositor/mockclient.h
index 6bfb652ed..1d9f32774 100644
--- a/tests/auto/compositor/compositor/mockclient.h
+++ b/tests/auto/compositor/compositor/mockclient.h
@@ -26,7 +26,7 @@
**
****************************************************************************/
-#include <wayland-client.h>
+#include "wayland-wayland-client-protocol.h"
#include <qwayland-xdg-shell-unstable-v5.h>
#include <wayland-ivi-application-client-protocol.h>
diff --git a/tests/auto/compositor/compositor/mockkeyboard.h b/tests/auto/compositor/compositor/mockkeyboard.h
index 1090db597..fd7f06aee 100644
--- a/tests/auto/compositor/compositor/mockkeyboard.h
+++ b/tests/auto/compositor/compositor/mockkeyboard.h
@@ -30,7 +30,7 @@
#define MOCKKEYBOARD_H
#include <QObject>
-#include <wayland-client.h>
+#include "wayland-wayland-client-protocol.h"
class MockKeyboard : public QObject
{
diff --git a/tests/auto/compositor/compositor/mockpointer.h b/tests/auto/compositor/compositor/mockpointer.h
index 2054040fd..db6b2b69c 100644
--- a/tests/auto/compositor/compositor/mockpointer.h
+++ b/tests/auto/compositor/compositor/mockpointer.h
@@ -30,7 +30,7 @@
#define MOCKPOINTER_H
#include <QObject>
-#include <wayland-client.h>
+#include "wayland-wayland-client-protocol.h"
class MockPointer : public QObject
{
diff --git a/tests/auto/compositor/compositor/mockseat.h b/tests/auto/compositor/compositor/mockseat.h
index f8c103ed4..0d0f4074c 100644
--- a/tests/auto/compositor/compositor/mockseat.h
+++ b/tests/auto/compositor/compositor/mockseat.h
@@ -32,7 +32,7 @@
#include "mockkeyboard.h"
#include <QObject>
-#include <wayland-client.h>
+#include "wayland-wayland-client-protocol.h"
class MockSeat : public QObject
{
diff --git a/tests/auto/compositor/compositor/testcompositor.cpp b/tests/auto/compositor/compositor/testcompositor.cpp
index 710bb7b3a..22ecf28cb 100644
--- a/tests/auto/compositor/compositor/testcompositor.cpp
+++ b/tests/auto/compositor/compositor/testcompositor.cpp
@@ -30,7 +30,7 @@
#include "testseat.h"
#include "testkeyboardgrabber.h"
-#include <wayland-server.h>
+#include <wayland-server-core.h>
TestCompositor::TestCompositor(bool createInputDev)
: shell(new QWaylandWlShell(this))