diff options
-rw-r--r-- | tests/auto/client/shared/coreprotocol.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/client/shared/coreprotocol.h b/tests/auto/client/shared/coreprotocol.h index 3670dc641..45f93ec55 100644 --- a/tests/auto/client/shared/coreprotocol.h +++ b/tests/auto/client/shared/coreprotocol.h @@ -139,6 +139,21 @@ protected: void surface_frame(Resource *resource, uint32_t callback) override; }; +class Region : public QtWaylandServer::wl_region +{ +public: + explicit Region(wl_client *client, int id, int version) + : QtWaylandServer::wl_region(client, id, version) + { + } + + void region_destroy_resource(Resource *resource) override + { + Q_UNUSED(resource); + delete this; + } +}; + class WlCompositor : public Global, public QtWaylandServer::wl_compositor { Q_OBJECT @@ -162,6 +177,12 @@ protected: m_surfaces.append(surface); emit surfaceCreated(surface); } + + static void compositor_create_region(wl_client *client, wl_resource *compositorResource, + uint32_t id) + { + new Region(client, id, wl_resource_get_version(compositorResource)); + } }; class Subsurface : public QObject, public QtWaylandServer::wl_subsurface |