From: InHong Han Date: Thu, 18 Aug 2016 08:39:07 +0000 (+0900) Subject: Fix bug IME does not render sometimes X-Git-Tag: submit/tizen/20160818.053203~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=767c69999b990eb2c5abf2b92fc75f5dc455758b;p=platform%2Fcore%2Fuifw%2Fe-mod-tizen-wl-textinput.git Fix bug IME does not render sometimes Change-Id: Ib1f0f3f77c96ef9331fcf892c5aae53ad134d2e7 --- diff --git a/src/e_mod_input_panel.c b/src/e_mod_input_panel.c index 1a8a454..9610aa3 100644 --- a/src/e_mod_input_panel.c +++ b/src/e_mod_input_panel.c @@ -730,6 +730,7 @@ e_input_panel_wait_update_set(Eina_Bool wait_update) #endif } +#ifndef _TV EINTERN void e_input_panel_transient_for_set(E_Client *parent) { @@ -782,3 +783,4 @@ e_input_panel_transient_for_set(E_Client *parent) EC_CHANGED(child); } } +#endif \ No newline at end of file diff --git a/src/e_mod_main.c b/src/e_mod_main.c index e540ed5..3ba44b7 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -99,11 +99,14 @@ static uint32_t g_keymap_index = 0; static Eina_Bool g_keyboard_mode_engligh = EINA_TRUE; static Ecore_Timer *g_timer_will_hide = NULL; static enum _E_Input_Panel_State g_input_panel_state = E_INPUT_PANEL_STATE_DID_HIDE; +#ifndef _TV static Eina_List *hooks_ec = NULL; static E_Client *transient_for_ec = NULL; +#endif const int WILL_HIDE_TIMER_INTERVAL = 1.0f; +#ifndef _TV #undef E_CLIENT_HOOK_APPEND #define E_CLIENT_HOOK_APPEND(l, t, cb, d) \ do \ @@ -114,6 +117,7 @@ const int WILL_HIDE_TIMER_INTERVAL = 1.0f; l = eina_list_append(l, _h); \ } \ while (0) +#endif static struct _E_Input_Method_Keymap_Info g_keymap_info[] = { {"en_US", "evdev", "pc105", "us"}, @@ -1000,6 +1004,7 @@ _e_text_input_cb_activate(struct wl_client *client, struct wl_resource *resource EINA_SAFETY_ON_NULL_GOTO(g_input_method, err); EINA_SAFETY_ON_NULL_GOTO(g_input_method->resource, err); +#ifndef _TV /* Store application window's E_Client* value for setting transient_for information later */ E_Client *ec = wl_resource_get_user_data(surface); EINA_SAFETY_ON_NULL_GOTO(ec, err); @@ -1007,6 +1012,7 @@ _e_text_input_cb_activate(struct wl_client *client, struct wl_resource *resource transient_for_ec = ec; e_input_panel_transient_for_set(transient_for_ec); WTI_LOG("TRANSIENT_FOR::Application window's E_Client* value : %p\n", transient_for_ec); +#endif text_input = wl_resource_get_user_data(resource); g_text_input = text_input; @@ -1200,15 +1206,18 @@ _e_text_input_cb_input_panel_show(struct wl_client *client, struct wl_resource * if (text_input->resource) wl_text_input_send_input_panel_state(text_input->resource, WL_TEXT_INPUT_INPUT_PANEL_STATE_SHOW); - +#ifndef _TV e_input_panel_transient_for_set(transient_for_ec); +#endif } static void _e_text_input_cb_input_panel_hide(struct wl_client *client, struct wl_resource *resource) { _input_panel_hide(client, resource, EINA_FALSE); +#ifndef _TV e_input_panel_transient_for_set(NULL); +#endif } static void @@ -1850,6 +1859,7 @@ _e_text_input_method_context_cb_client_resize(void *data EINA_UNUSED, int type E return ECORE_CALLBACK_PASS_ON; } +#ifndef _TV static void _pol_cb_hook_client_del(void *d EINA_UNUSED, E_Client *ec) { @@ -1862,6 +1872,7 @@ _pol_cb_hook_client_del(void *d EINA_UNUSED, E_Client *ec) WTI_LOG("TRANSIENT_FOR::Reset transient_for_ec to NULL\n"); } } +#endif E_API void * e_modapi_init(E_Module *m) @@ -1896,7 +1907,9 @@ e_modapi_init(E_Module *m) if (!eeze_udev_watch_hander) goto err; +#ifndef _TV E_CLIENT_HOOK_APPEND(hooks_ec, E_CLIENT_HOOK_DEL, _pol_cb_hook_client_del, NULL); +#endif return m; err: @@ -1908,7 +1921,9 @@ E_API int e_modapi_shutdown(E_Module *m EINA_UNUSED) { E_FREE_LIST(handlers, ecore_event_handler_del); +#ifndef _TV E_FREE_LIST(hooks_ec, e_client_hook_del); +#endif if (g_timer_will_hide) { diff --git a/src/e_mod_main.h b/src/e_mod_main.h index 2f1e687..2dc93f8 100644 --- a/src/e_mod_main.h +++ b/src/e_mod_main.h @@ -8,6 +8,8 @@ void e_input_panel_shutdown(void); void e_input_panel_visibility_change(Eina_Bool visible); Eina_Bool e_input_panel_client_find(E_Client *ec); EINTERN void e_input_panel_wait_update_set(Eina_Bool wait_update); +#ifndef _TV EINTERN void e_input_panel_transient_for_set(E_Client *parent); +#endif #endif