diff options
author | Jason Ekstrand <jason@jlekstrand.net> | 2013-06-27 20:17:02 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-07-03 14:52:06 -0400 |
commit | a85118c1b85df6fbf8f896dca971a5b79a94da71 (patch) | |
tree | 30390d8883a0e823d62a1c7dc9872b33b7e8e111 /src/zoom.c | |
parent | d27cb096adf71139734b434d60cbb28bd4a510b1 (diff) | |
download | weston-a85118c1b85df6fbf8f896dca971a5b79a94da71.tar.gz weston-a85118c1b85df6fbf8f896dca971a5b79a94da71.tar.bz2 weston-a85118c1b85df6fbf8f896dca971a5b79a94da71.zip |
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>
Diffstat (limited to 'src/zoom.c')
-rw-r--r-- | src/zoom.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -53,8 +53,14 @@ static void bind_text_cursor_position(struct wl_client *client, void *data, uint32_t version, uint32_t id) { - wl_client_add_object(client, &text_cursor_position_interface, - &text_cursor_position_implementation, id, data); + struct wl_resource *resource; + + resource = wl_resource_create(client, + &text_cursor_position_interface, 1, id); + if (resource) + wl_resource_set_implementation(resource, + &text_cursor_position_implementation, + data, NULL); } static void |