Skip to content
Commit 4917a967 authored by Jason Ekstrand's avatar Jason Ekstrand Committed by Kristian Høgsberg
Browse files

Add wl_resource_create() and a version field to wl_resource



A new function, wl_resource_create(), lets the compositor create a
wl_resource for a given version of the interface.  Passing 0 for the
object ID will allocate a new ID. The implementation, user data and
destructor can be set with wl_resource_set_implementation().

These two functions deprecates wl_client_add/new_object and the
main difference and motivation is the ability to provide a version number
for the resource.  This lets the compositor track which version of the
interface a client has created and we'll use that to verify incoming requests.

Signed-off-by: default avatarJason Ekstrand <jason@jlekstrand.net>
parent d35b6278
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment