From 3c62f362de257e3b15e2b57f1626db105632c548 Mon Sep 17 00:00:00 2001 From: InHong Han Date: Tue, 10 Nov 2020 14:00:41 +0900 Subject: [PATCH] Modified to send the destory message to ISF panel Change-Id: I9cce867b1eb46be37c868cf194dec64eaa663f8b --- src/e_mod_main.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/e_mod_main.c b/src/e_mod_main.c index 59b8003..7611a2e 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -2146,7 +2146,6 @@ _e_text_input_cb_destroy(struct wl_client *client, struct wl_resource *resource) { E_Text_Input *text_input = wl_resource_get_user_data(resource); E_Input_Method *input_method = NULL; - Eina_Bool _context_created = EINA_FALSE; if (!text_input) { @@ -2171,22 +2170,20 @@ _e_text_input_cb_destroy(struct wl_client *client, struct wl_resource *resource) text_input, (text_input == g_text_input), input_method, input_method->resource, input_method->context, (input_method->context ? input_method->context->resource : NULL), resource); + if (input_method->input) + _e_text_input_deactivate(text_input, input_method, EINA_FALSE); + if ((!input_method->context) || (!input_method->context->resource)) - _context_created = _e_text_input_method_create_context(client, input_method, text_input, EINA_FALSE); + _e_text_input_method_create_context(client, input_method, text_input, EINA_FALSE); - if (text_input == g_text_input) + if (text_input == g_text_input && + input_method->resource && input_method->context && input_method->context->resource) { - if (_context_created) - _e_text_input_deactivate(text_input, input_method, EINA_FALSE); + wl_input_method_send_destroy(input_method->resource, input_method->context->resource); + LOGI("wm_map TEXTINPUT destroy : input_method->resource(%p) input_method->context->resource(%p)", + input_method->resource, input_method->context->resource); - if (input_method->resource && input_method->context && input_method->context->resource) - { - wl_input_method_send_destroy(input_method->resource, input_method->context->resource); - LOGI("wm_map TEXTINPUT destroy : input_method->resource(%p) input_method->context->resource(%p)", - input_method->resource, input_method->context->resource); - - destroyed_resource = input_method->resource; - } + destroyed_resource = input_method->resource; } } -- 2.7.4