Implement CoreProtocol::compositor_create_region
Otherwise tests using it crash. Pick-to: 5.15 Change-Id: Id2ce98ed7c975144728be7566e20b6ea08fa9150 Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
parent
7bf4c434a4
commit
19483db52c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user