Show panel in TV profile when get focus 12/54412/2
authorLi Zhang <li2012.zhang@samsung.com>
Tue, 15 Dec 2015 06:38:40 +0000 (14:38 +0800)
committerLi Zhang <li2012.zhang@samsung.com>
Tue, 15 Dec 2015 06:51:49 +0000 (14:51 +0800)
Change-Id: I84c6ac590d86cb5f1000b4c5d865b30c35a89034

packaging/e-mod-tizen-wl-textinput.spec
src/e_mod_main.c

index 92dc83e46abfea689fef79fc6ce85b50401a54d8..99e5722c771fbd8e361b4e3fba2a8f6a71c5177f 100644 (file)
@@ -22,6 +22,12 @@ The Enlightenment WM Wayland Text Input Module for Tizen
 %setup -q -n %{name}-%{version}
 
 %build
+
+%if "%{profile}" == "tv"
+CFLAGS+=" -D_TV";
+CXXFLAGS+=" -D_TV";
+%endif
+
 %autogen
 %configure
 make %{?_smp_mflags}
index fb2f52976cb0062845cc495a265cb0d72d4548a2..cab4699ea9657151bce5183c3743c35aa2f3ab02 100644 (file)
@@ -62,7 +62,7 @@ struct _E_Mod_Text_Input_Shutdown_Cb
 
 static E_Input_Method *g_input_method = NULL;
 static Eina_List *shutdown_list = NULL;
-static Eina_Bool g_keyboard_connecting = EINA_FALSE;
+static Eina_Bool g_disable_show_panel = EINA_FALSE;
 static Eeze_Udev_Watch *eeze_udev_watch_hander = NULL;
 static Ecore_Event_Handler *ecore_key_down_handler = NULL;
 
@@ -569,7 +569,7 @@ _e_mod_ecore_key_down_cb(void *data, int type, void *event)
 {
    Ecore_Event_Key *ev = (Ecore_Event_Key *)event;
 
-   if (g_keyboard_connecting == EINA_TRUE)
+   if (g_disable_show_panel == EINA_TRUE)
      return ECORE_CALLBACK_PASS_ON;
 
    /* process remote controller key exceptionally */
@@ -588,7 +588,7 @@ _e_mod_ecore_key_down_cb(void *data, int type, void *event)
        is_number_key(ev->string))
      return ECORE_CALLBACK_PASS_ON;
 
-   g_keyboard_connecting = EINA_TRUE;
+   g_disable_show_panel = EINA_TRUE;
    e_input_panel_visibility_change(EINA_FALSE);
 
    return ECORE_CALLBACK_PASS_ON;
@@ -682,6 +682,10 @@ _e_text_input_cb_activate(struct wl_client *client, struct wl_resource *resource
         wl_input_method_send_activate(input_method->resource, context->resource);
      }
 
+#ifdef _TV
+   g_disable_show_panel = EINA_FALSE;
+#endif
+
    if (text_input->input_panel_visibile)
      e_input_panel_visibility_change(EINA_TRUE);
 
@@ -751,7 +755,7 @@ _e_text_input_cb_input_panel_show(struct wl_client *client EINA_UNUSED, struct w
         return;
      }
 
-   if (g_keyboard_connecting == EINA_TRUE)
+   if (g_disable_show_panel == EINA_TRUE)
      return;
 
    text_input->input_panel_visibile = EINA_TRUE;
@@ -1262,7 +1266,7 @@ static void
 _e_mod_eeze_udev_watch_cb(const char *text, Eeze_Udev_Event event, void *data, Eeze_Udev_Watch *watch)
 {
    if (event == EEZE_UDEV_EVENT_REMOVE)
-     g_keyboard_connecting = EINA_FALSE;
+     g_disable_show_panel = EINA_FALSE;
 }
 
 EAPI void *