Some additional checks to avoid cases where agl-shell is still
using the version 1 but we're checking against at least version 2 (where
we introduced some additional events). Part of the compat series.
Bug-AGL: SPEC-4667
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4f5d34fd8b9fe6cf6b8097948afebee550f5345d
struct ivi_output *output;
struct ivi_surface *surface, *tmp;
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. "
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;
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. "
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;
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,
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);
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. "
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 */
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->shell_client.status = BOUND_OK;
}
ivi = wl_resource_get_user_data(resource);
/* reset status to allow other clients issue legit requests */
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;
}
ivi->shell_client.status = BOUND_OK;
return;
}