<div dir="ltr">Does this mean it is not possible to start a stand alone input method???<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 7, 2013 at 6:12 PM, Jan Arne Petersen <span dir="ltr"><<a href="mailto:jpetersen@openismus.com" target="_blank">jpetersen@openismus.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Jan Arne Petersen <<a href="mailto:jpetersen@openismus.com">jpetersen@openismus.com</a>><br>
<br>
Signed-off-by: Jan Arne Petersen <<a href="mailto:jpetersen@openismus.com">jpetersen@openismus.com</a>><br>
---<br>
src/text-backend.c | 21 ++++++++++++++-------<br>
1 file changed, 14 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/src/text-backend.c b/src/text-backend.c<br>
index 07a066c..53aa92c 100644<br>
--- a/src/text-backend.c<br>
+++ b/src/text-backend.c<br>
@@ -759,17 +759,24 @@ bind_input_method(struct wl_client *client,<br>
NULL,<br>
id, input_method);<br>
<br>
- if (input_method->input_method_binding == NULL) {<br>
- resource->destroy = unbind_input_method;<br>
- input_method->input_method_binding = resource;<br>
+ if (input_method->input_method_binding != NULL) {<br>
+ wl_resource_post_error(resource, WL_DISPLAY_ERROR_INVALID_OBJECT,<br>
+ "interface object already bound");<br>
+ wl_resource_destroy(resource);<br>
+ return;<br>
+ }<br>
<br>
- text_backend->input_method.binding = resource;<br>
+ if (text_backend->input_method.client != client) {<br>
+ wl_resource_post_error(resource, WL_DISPLAY_ERROR_INVALID_OBJECT,<br>
+ "permission to bind desktop_shell denied");<br>
+ wl_resource_destroy(resource);<br>
return;<br>
}<br>
<br>
- wl_resource_post_error(resource, WL_DISPLAY_ERROR_INVALID_OBJECT,<br>
- "interface object already bound");<br>
- wl_resource_destroy(resource);<br>
+ resource->destroy = unbind_input_method;<br>
+ input_method->input_method_binding = resource;<br>
+<br>
+ text_backend->input_method.binding = resource;<br>
}<br>
<br>
static void<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.1.4<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</font></span></blockquote></div><br></div></div>