Fix bug IME does not render sometimes 78/84378/1
authorInHong Han <inhong1.han@samsung.com>
Thu, 18 Aug 2016 08:39:07 +0000 (17:39 +0900)
committerInHong Han <inhong1.han@samsung.com>
Thu, 18 Aug 2016 08:50:36 +0000 (17:50 +0900)
Change-Id: Ib1f0f3f77c96ef9331fcf892c5aae53ad134d2e7

src/e_mod_input_panel.c
src/e_mod_main.c
src/e_mod_main.h

index 1a8a454e45555ab3eb0bb3439f340500281f7989..9610aa38d491a1e6ab1cf1c96247fe886e6ebdda 100644 (file)
@@ -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
index e540ed5ba65b329de696f5e27098ba445f0dc2d9..3ba44b76760d98f9c08af718a47409a5d78377ed 100644 (file)
@@ -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)
      {
index 2f1e687645e4496287865dbf4c0c17fc12367804..2dc93f8f4e583085bdeac6a0a12571674eedf326 100644 (file)
@@ -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