aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wayland-shm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wayland-shm.c b/src/wayland-shm.c
index 8fb657a..1938644 100644
--- a/src/wayland-shm.c
+++ b/src/wayland-shm.c
@@ -310,6 +310,7 @@ shm_create_pool(struct wl_client *client, struct wl_resource *resource,
int seals;
int prot;
int flags;
+ uint32_t version;
if (size <= 0) {
wl_resource_post_error(resource,
@@ -358,8 +359,10 @@ shm_create_pool(struct wl_client *client, struct wl_resource *resource,
#else
close(fd);
#endif
+
+ version = wl_resource_get_version(resource);
pool->resource =
- wl_resource_create(client, &wl_shm_pool_interface, 1, id);
+ wl_resource_create(client, &wl_shm_pool_interface, version, id);
if (!pool->resource) {
wl_client_post_no_memory(client);
munmap(pool->data, pool->size);
@@ -392,7 +395,7 @@ bind_shm(struct wl_client *client,
struct wl_array *additional_formats;
uint32_t *p;
- resource = wl_resource_create(client, &wl_shm_interface, 1, id);
+ resource = wl_resource_create(client, &wl_shm_interface, version, id);
if (!resource) {
wl_client_post_no_memory(client);
return;