summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2023-12-19 16:24:05 +0200
committerMarius Vlad <marius.vlad@collabora.com>2023-12-20 19:05:44 +0200
commit071440ef54444c3be2aa72a402563a97cc350e3b (patch)
tree496af840760db4311d38d0ed5beffaee05edd212
parent675456391e4f74559661206ec919cb5f6cb46f69 (diff)
shell: Provide a better explanation for terminating the connection
And make sure we clear off the remaing client resources when doing an unbind. It seems we would hit it when checking set_background/ready/set_panel requests, resulting in a protocol violation and finally terminating the connection. Bug-AGL: SPEC-4977 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ie5ed881511ec2ac4501d2a5cac349abc7f83c1fe
-rw-r--r--src/shell.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/shell.c b/src/shell.c
index 5157830..c089bec 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1108,8 +1108,8 @@ shell_ready(struct wl_client *client, struct wl_resource *shell_res)
ivi->shell_client.status == BOUND_FAILED) {
wl_resource_post_error(shell_res,
WL_DISPLAY_ERROR_INVALID_OBJECT,
- "agl_shell has already been bound. "
- "Check out bound_fail event");
+ "agl_shell (ready quest) has already "
+ "been bound. Check out bound_fail event");
return;
}
@@ -1165,8 +1165,8 @@ shell_set_background(struct wl_client *client,
ivi->shell_client.resource_ext == shell_res) {
wl_resource_post_error(shell_res,
WL_DISPLAY_ERROR_INVALID_OBJECT,
- "agl_shell has already been bound. "
- "Check out bound_fail event");
+ "agl_shell (set_background) has already "
+ "been bound. Check out bound_fail event");
return;
}
@@ -1230,7 +1230,7 @@ shell_set_panel(struct wl_client *client,
ivi->shell_client.resource_ext == shell_res) {
wl_resource_post_error(shell_res,
WL_DISPLAY_ERROR_INVALID_OBJECT,
- "agl_shell has already been bound. "
+ "agl_shell (set_panel) has already been bound. "
"Check out bound_fail event");
return;
}
@@ -1860,6 +1860,7 @@ unbind_agl_shell(struct wl_resource *resource)
ivi->shell_client.ready = false;
ivi->shell_client.resource = NULL;
+ ivi->shell_client.resource_ext = NULL;
ivi->shell_client.client = NULL;
}
@@ -1869,6 +1870,7 @@ unbind_agl_shell_ext(struct wl_resource *resource)
struct ivi_compositor *ivi = wl_resource_get_user_data(resource);
ivi->shell_client_ext.resource = NULL;
+ ivi->shell_client.resource_ext = NULL;
}
static void