commit 1e551c63c085df48569c273bf89b5051c6877bde
parent cf175c03c92b648f221e9a3fcdef7394b23c1206
Author: Nihal Jere <nihal@nihaljere.xyz>
Date: Wed, 7 Jul 2021 14:32:11 -0500
text_input: set input method uninitialized on tileave
This way when tienter runs, it will relaunch the input method
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libswc/text_input.c b/libswc/text_input.c
@@ -109,7 +109,9 @@ commit(struct wl_client *client, struct wl_resource *resource)
tim->enabled->serial++;
if (!ti->initialized) {
- input_method_launch(ti->hint, ti->purpose);
+ if (!input_method_launch(ti->hint, ti->purpose)) {
+ ERROR("failed to launch input method\n");
+ }
ti->initialized = true;
/* get_input_method takes care of send events to the input method on init */
return;
@@ -234,6 +236,7 @@ leave(struct input_focus_handler *handler, struct wl_list *resources, struct com
}
if (tim->enabled) {
+ tim->enabled->initialized = false;
zwp_text_input_v3_send_leave(tim->enabled->resource, surface);
disable(wl_resource_get_client(tim->enabled->resource), tim->enabled->resource);
}