diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-09-12 14:12:44 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2018-10-03 08:36:56 +0000 |
commit | a6160b7dbc47e707ef188f19fa52b5b2b572509a (patch) | |
tree | 0503595b838efe1a0f27d410382d82974d73e765 /src/hardwareintegration | |
parent | 9c5d1b634ea82fdc1b09713da4565b905d2c9123 (diff) |
Don't include system versions of wayland protocol
wayland-client.h and wayland-server.h includes protocol generated for the
version of wayland.xml corresponding to the libwayland version. This becomes a
problem when we want to support a version of wayland.xml that's newer than the
system libwayland.
The solution is to include wayland-client-core.h and wayland-client-server.h
instead. These headers don't include any wayland-scanner generated code, so we
can safely compile and link code generated against the version of wayland.xml
that we ship.
[ChangeLog] Code generated by qtwaylandscanner now includes
wayland-client-core.h and wayland-server-core.h instead of wayland-client.h and
wayland-server.h. This might break source compatibility for code using custom
wayland extensions.
Fixes: QTBUG-70553
Change-Id: Ice0cdb60ecc4f936acc0e158b96f7978549f62c1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/hardwareintegration')
12 files changed, 14 insertions, 14 deletions
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 |