+ } else {
+ /* fallback for just version 1 of the protocol */
+ wl_resource_set_implementation(resource, &agl_shell_implementation,
+ ivi, unbind_agl_shell);
+ ivi->shell_client.resource = resource;
+ }
+}
+
+static void
+bind_agl_shell_ext(struct wl_client *client,
+ void *data, uint32_t version, uint32_t id)
+{
+ struct ivi_compositor *ivi = data;
+ struct wl_resource *resource;
+
+ resource = wl_resource_create(client, &agl_shell_ext_interface, version, id);
+ if (!resource) {
+ wl_client_post_no_memory(client);
+ return;
+ }
+
+ if (ivi->shell_client_ext.resource) {
+ wl_resource_post_error(resource, WL_DISPLAY_ERROR_INVALID_OBJECT,
+ "agl_shell_ext has already been bound");
+ return;
+ }
+
+ wl_resource_set_implementation(resource, &agl_shell_ext_implementation,
+ ivi, unbind_agl_shell_ext);
+ ivi->shell_client_ext.resource = resource;