struct ivi_output *output;
struct ivi_surface *surface, *tmp;
- if (ivi->shell_client.status == BOUND_FAILED) {
+ if (wl_resource_get_version(shell_res) >=
+ AGL_SHELL_BOUND_OK_SINCE_VERSION &&
+ ivi->shell_client.status == BOUND_FAILED) {
wl_resource_post_error(shell_res,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"agl_shell has already been bound. "
struct weston_desktop_surface *dsurface;
struct ivi_surface *surface;
- if (ivi->shell_client.status == BOUND_FAILED ||
- ivi->shell_client.resource_ext == shell_res) {
+ if ((wl_resource_get_version(shell_res) >=
+ AGL_SHELL_BOUND_OK_SINCE_VERSION &&
+ ivi->shell_client.status == BOUND_FAILED) ||
+ ivi->shell_client.resource_ext == shell_res) {
wl_resource_post_error(shell_res,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"agl_shell has already been bound. "
struct ivi_surface **member;
int32_t width = 0, height = 0;
- if (ivi->shell_client.status == BOUND_FAILED ||
+ if ((wl_resource_get_version(shell_res) >=
+ AGL_SHELL_BOUND_OK_SINCE_VERSION &&
+ ivi->shell_client.status == BOUND_FAILED) ||
ivi->shell_client.resource_ext == shell_res) {
wl_resource_post_error(shell_res,
WL_DISPLAY_ERROR_INVALID_OBJECT,
struct ivi_compositor *ivi = wl_resource_get_user_data(shell_res);
struct ivi_output *output = to_ivi_output(woutput);
- if (ivi->shell_client.status == BOUND_FAILED) {
+ if (wl_resource_get_version(shell_res) >=
+ AGL_SHELL_BOUND_OK_SINCE_VERSION &&
+ ivi->shell_client.status == BOUND_FAILED) {
wl_resource_post_error(shell_res,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"agl_shell has already been bound. "
struct ivi_compositor *ivi = wl_resource_get_user_data(res);
/* reset status in case bind_fail was sent */
- if (ivi->shell_client.status == BOUND_FAILED)
+ if (wl_resource_get_version(res) >= AGL_SHELL_BOUND_OK_SINCE_VERSION &&
+ ivi->shell_client.status == BOUND_FAILED)
ivi->shell_client.status = BOUND_OK;
}
ivi = wl_resource_get_user_data(resource);
/* reset status to allow other clients issue legit requests */
- if (ivi->shell_client.status == BOUND_FAILED) {
+ if (wl_resource_get_version(resource) >=
+ AGL_SHELL_BOUND_OK_SINCE_VERSION &&
+ ivi->shell_client.status == BOUND_FAILED) {
ivi->shell_client.status = BOUND_OK;
return;
}
wl_list_for_each(output, &ivi->outputs, link) {
+ struct weston_geometry area = {};
+
/* reset the active surf if there's one present */
if (output->active) {
output->active->view->is_mapped = false;
output->active = NULL;
}
+ output->area_activation = area;
insert_black_curtain(output);
}
but still do the assignment */
ivi->shell_client.status = BOUND_OK;
agl_shell_send_bound_ok(ivi->shell_client.resource);
+ } 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;
}
}