- if (ivi->shell_client.status == BOUND_OK &&
- wl_resource_get_version(resource) >= AGL_SHELL_BOUND_OK_SINCE_VERSION)
+ if (wl_resource_get_version(resource) >=
+ AGL_SHELL_BOUND_OK_SINCE_VERSION) {
+ wl_resource_set_implementation(resource, &agl_shell_implementation,
+ ivi, unbind_agl_shell);
+ ivi->shell_client.resource = resource;
+ /* if we land here we'll have BOUND_OK by default,
+ but still do the assignment */
+ ivi->shell_client.status = BOUND_OK;