Use wl_resource_create() for creating resources

This commit sets the version numbers for all added/created objects.  The
wl_compositor.create_surface implementation was altered to create a surface
with the same version as the underlying wl_compositor.  Since no other
"child interfaces" have version greater than 1, they were all hard-coded to
version 1.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Jason Ekstrand
2013-06-27 20:17:02 -05:00
committed by Kristian Høgsberg
parent d27cb096ad
commit a85118c1b8
11 changed files with 165 additions and 122 deletions
+4 -2
View File
@@ -191,8 +191,10 @@ bind_test(struct wl_client *client, void *data, uint32_t version, uint32_t id)
struct weston_test *test = data;
struct wl_resource *resource;
resource = wl_client_add_object(client, &wl_test_interface,
&test_implementation, id, test);
resource = wl_client_add_versioned_object(client, &wl_test_interface,
1, id);
wl_resource_set_implementation(resource, &test_implementation,
test, NULL);
notify_pointer_position(test, resource);
}