[server] Add ClientConnection::getResource
Returns the wl_resource associated with a given id for the client if it exists.
This commit is contained in:
parent
fd6ab581a1
commit
3a01f7155a
2 changed files with 10 additions and 0 deletions
|
@ -100,6 +100,11 @@ wl_resource *ClientConnection::createResource(const wl_interface *interface, qui
|
|||
return wl_resource_create(d->client, interface, version, id);
|
||||
}
|
||||
|
||||
wl_resource *ClientConnection::getResource(quint32 id)
|
||||
{
|
||||
return wl_client_get_object(d->client, id);
|
||||
}
|
||||
|
||||
wl_client *ClientConnection::client()
|
||||
{
|
||||
return d->client;
|
||||
|
|
|
@ -43,6 +43,11 @@ public:
|
|||
|
||||
void flush();
|
||||
wl_resource *createResource(const wl_interface *interface, quint32 version, quint32 id);
|
||||
/**
|
||||
* Get the wl_resource associated with the given @p id.
|
||||
* @since 5.3
|
||||
**/
|
||||
wl_resource *getResource(quint32 id);
|
||||
|
||||
wl_client *client();
|
||||
Display *display();
|
||||
|
|
Loading…
Reference in a new issue