From: Jihoon Kim Date: Tue, 15 Sep 2020 02:20:01 +0000 (+0900) Subject: Add more logs for debugging X-Git-Tag: submit/tizen/20200918.075318~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6cd20f57cd1573f2b7bee4351e7f04d797c9a9cf;p=platform%2Fcore%2Fuifw%2Fe-mod-tizen-wl-textinput.git Add more logs for debugging Change-Id: I5b0e4e65847aa131681288a0e089adb0c7cf5bc4 Signed-off-by: Jihoon Kim --- diff --git a/src/e_mod_main.c b/src/e_mod_main.c index 9c5abec..99b977f 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -500,6 +500,7 @@ _e_mod_text_input_shutdown_cb_add(void (*func)(void *data), void *data) static void _e_text_input_method_context_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource) { + LOGD("resource : %p", resource); wl_resource_destroy(resource); } @@ -1146,9 +1147,14 @@ _e_text_input_method_context_cb_resource_destroy(struct wl_resource *resource) #if ENABLE_GRAB_KEYBOARD if (context->kbd.resource) - wl_resource_destroy(context->kbd.resource); + { + wl_resource_destroy(context->kbd.resource); + context->kbd.resource = NULL; + } #endif + LOGD("resource : %p", resource); + if ((context->input_method) && (context->input_method->context == context)) context->input_method->context = NULL; @@ -1216,8 +1222,6 @@ _e_mod_ecore_key_down_cb(void *data, int type, void *event) static void _e_text_input_deactivate(E_Text_Input *text_input, E_Input_Method *input_method, Eina_Bool need_focus_in) { - LOGD("text_input : %p\n", text_input); - if (text_input == g_text_input) { g_text_input = NULL; @@ -1244,7 +1248,7 @@ _e_text_input_deactivate(E_Text_Input *text_input, E_Input_Method *input_method, ecore_key_down_handler = NULL; } - LOGD("Resetting input_method->input : %p", input_method->input); + LOGD("Resetting input_method->input : %p, text_input : %p", input_method->input, text_input); input_method->input = NULL; if (input_method->context) input_method->context->input = NULL; input_method->context = NULL; @@ -1328,7 +1332,11 @@ _e_text_input_cb_activate(struct wl_client *client, struct wl_resource *resource if (context->resource) wl_input_method_send_activate(input_method->resource, context->resource, text_input->id, EINA_TRUE); + else + WRN("Failed to send activate due to no resource in context"); } + else + WRN("no inputmethod resource"); if (_TV || _WEARABLE) set_soft_keyboard_mode(); @@ -1484,6 +1492,10 @@ _e_text_input_cb_input_panel_show(struct wl_client *client, struct wl_resource * * and also don't have released buffer */ e_input_panel_wait_update_set(EINA_TRUE); } + else + { + LOGW("Failed to send show input panel. inputmethod : %p, input_method->resource : %p, input_method->context : %p, input_method->context->resource : %p", input_method, input_method->resource, input_method->context, input_method->context->resource); + } /* If the input panel state was WILL_HIDE, it means that the conformant area information needs to be restored */ if (g_input_panel_state == E_INPUT_PANEL_STATE_WILL_HIDE) @@ -2057,6 +2069,8 @@ _e_text_input_cb_resource_destroy(struct wl_resource *resource) return; } + LOGD("resource : %p", resource); + if (g_show_text_input == text_input) { if (text_input->input_panel_visibile) @@ -2085,7 +2099,6 @@ _e_text_input_cb_resource_destroy(struct wl_resource *resource) static void _e_text_input_cb_destroy(struct wl_client *client, struct wl_resource *resource) { - LOGD(""); E_Text_Input *text_input = wl_resource_get_user_data(resource); E_Input_Method *input_method = NULL; Eina_Bool _context_created = EINA_FALSE; @@ -2109,6 +2122,8 @@ _e_text_input_cb_destroy(struct wl_client *client, struct wl_resource *resource) return; } + LOGD("text_input : %p, input_method : %p, resource : %p", text_input, input_method, resource); + if ((!input_method->context) || (!input_method->context->resource)) _context_created = _e_text_input_method_create_context(client, input_method, text_input, EINA_FALSE); @@ -2273,7 +2288,10 @@ _e_text_input_method_destroy(void *data) return; if (input_method->global) - wl_global_destroy(input_method->global); + { + wl_global_destroy(input_method->global); + input_method->global = NULL; + } free(input_method); } @@ -2309,7 +2327,13 @@ _e_text_input_manager_destroy(void *data) E_Text_Input_Mgr *text_input_mgr = data; if (!text_input_mgr) return; - wl_global_destroy(text_input_mgr->global); + LOGD("input manager : %p", text_input_mgr); + + if (text_input_mgr->global) + { + wl_global_destroy(text_input_mgr->global); + text_input_mgr->global = NULL; + } free(text_input_mgr); } @@ -2335,6 +2359,8 @@ _e_text_input_manager_create(void) return EINA_FALSE; } + LOGD("input manager : %p", text_input_mgr); + _e_mod_text_input_shutdown_cb_add(_e_text_input_manager_destroy, text_input_mgr); return EINA_TRUE;