diff --git a/src/wayland/meta-wayland-pointer-gestures.c b/src/wayland/meta-wayland-pointer-gestures.c index 6fc1f1f54..17fae0fae 100644 --- a/src/wayland/meta-wayland-pointer-gestures.c +++ b/src/wayland/meta-wayland-pointer-gestures.c @@ -67,6 +67,15 @@ bind_pointer_gestures (struct wl_client *client, struct wl_resource *resource; resource = wl_resource_create (client, &_wl_pointer_gestures_interface, version, id); + + if (version != META__WL_POINTER_GESTURES_VERSION) + { + wl_resource_post_error (resource, + _WL_POINTER_GESTURES_ERROR_VERSION_MISMATCH, + "The client bound a non-supported version"); + return; + } + wl_resource_set_implementation (resource, &pointer_gestures_interface, NULL, NULL); } @@ -76,6 +85,6 @@ meta_wayland_pointer_gestures_init (MetaWaylandCompositor *compositor) { wl_global_create (compositor->wayland_display, &_wl_pointer_gestures_interface, - META_WL_POINTER_GESTURES_VERSION, + META__WL_POINTER_GESTURES_VERSION, NULL, bind_pointer_gestures); } diff --git a/src/wayland/meta-wayland-versions.h b/src/wayland/meta-wayland-versions.h index e2030d6b2..9ca8def69 100644 --- a/src/wayland/meta-wayland-versions.h +++ b/src/wayland/meta-wayland-versions.h @@ -44,6 +44,6 @@ #define META_XSERVER_VERSION 1 #define META_GTK_SHELL_VERSION 2 #define META_WL_SUBCOMPOSITOR_VERSION 1 -#define META_WL_POINTER_GESTURES_VERSION 1 +#define META__WL_POINTER_GESTURES_VERSION 1 #endif diff --git a/src/wayland/protocol/pointer-gestures.xml b/src/wayland/protocol/pointer-gestures.xml index 1bca8f7ed..041bf1401 100644 --- a/src/wayland/protocol/pointer-gestures.xml +++ b/src/wayland/protocol/pointer-gestures.xml @@ -16,6 +16,10 @@ name and the version will be reset to 1. + + + + Create a swipe gesture object. See the