diff options
Diffstat (limited to 'src/compositor/wayland_wrapper')
5 files changed, 10 insertions, 9 deletions
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..f31ef5d46 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 @@ -110,7 +110,7 @@ protected: void ref(); void deref(); void sendRelease(); - void setDestroyed(); + virtual void setDestroyed(); struct ::wl_resource *m_buffer = nullptr; QRegion m_damage; diff --git a/src/compositor/wayland_wrapper/qwldatasource.cpp b/src/compositor/wayland_wrapper/qwldatasource.cpp index baa47d6fc..f5f456790 100644 --- a/src/compositor/wayland_wrapper/qwldatasource.cpp +++ b/src/compositor/wayland_wrapper/qwldatasource.cpp @@ -41,6 +41,7 @@ #include "qwldataoffer_p.h" #include "qwldatadevice_p.h" #include "qwldatadevicemanager_p.h" +#include <QtWaylandCompositor/private/qwaylandutils_p.h> #include <unistd.h> #include <QtWaylandCompositor/private/wayland-wayland-server-protocol.h> @@ -101,7 +102,7 @@ void DataSource::setDevice(DataDevice *device) DataSource *DataSource::fromResource(struct ::wl_resource *resource) { - return static_cast<DataSource *>(Resource::fromResource(resource)->data_source_object); + return QtWayland::fromResource<DataSource *>(resource); } void DataSource::data_source_offer(Resource *, const QString &mime_type) diff --git a/src/compositor/wayland_wrapper/qwlregion.cpp b/src/compositor/wayland_wrapper/qwlregion.cpp index 52c19e946..4383474cb 100644 --- a/src/compositor/wayland_wrapper/qwlregion.cpp +++ b/src/compositor/wayland_wrapper/qwlregion.cpp @@ -39,6 +39,8 @@ #include "qwlregion_p.h" +#include <QtWaylandCompositor/private/qwaylandutils_p.h> + QT_BEGIN_NAMESPACE namespace QtWayland { @@ -54,9 +56,7 @@ Region::~Region() Region *Region::fromResource(struct ::wl_resource *resource) { - if (auto *r = Resource::fromResource(resource)) - return static_cast<Region *>(r->region_object); - return nullptr; + return QtWayland::fromResource<Region *>(resource); } void Region::region_destroy_resource(Resource *) diff --git a/src/compositor/wayland_wrapper/wayland_wrapper.pri b/src/compositor/wayland_wrapper/wayland_wrapper.pri index 3041d7696..b0c8371f4 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 \ |