Support show and hide input panel event 20/58720/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 3 Feb 2016 05:31:33 +0000 (14:31 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 3 Feb 2016 05:31:33 +0000 (14:31 +0900)
Change-Id: I24244fcbf6708651f9c3124973ab48551c20e921

src/e_mod_main.c

index a86fc53..8b880b4 100755 (executable)
@@ -752,6 +752,7 @@ static void
 _e_text_input_cb_input_panel_show(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
 {
    E_Text_Input *text_input = wl_resource_get_user_data(resource);
+   E_Input_Method *input_method = NULL;
 
    if (!text_input)
      {
@@ -764,6 +765,12 @@ _e_text_input_cb_input_panel_show(struct wl_client *client EINA_UNUSED, struct w
    if (g_disable_show_panel == EINA_TRUE)
      return;
 
+   if (g_input_method && g_input_method->resource)
+     input_method = wl_resource_get_user_data(g_input_method->resource);
+
+   if (input_method && input_method->resource && input_method->context && input_method->context->resource)
+     wl_input_method_send_show_input_panel(input_method->resource, input_method->context->resource);
+
    text_input->input_panel_visibile = EINA_TRUE;
 
    e_input_panel_visibility_change(EINA_TRUE);
@@ -777,6 +784,7 @@ static void
 _e_text_input_cb_input_panel_hide(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
 {
    E_Text_Input *text_input = wl_resource_get_user_data(resource);
+   E_Input_Method *input_method = NULL;
 
    if (!text_input)
      {
@@ -793,6 +801,12 @@ _e_text_input_cb_input_panel_hide(struct wl_client *client EINA_UNUSED, struct w
                                           WL_TEXT_INPUT_INPUT_PANEL_STATE_HIDE);
 
    e_input_panel_visibility_change(EINA_FALSE);
+
+   if (g_input_method && g_input_method->resource)
+     input_method = wl_resource_get_user_data(g_input_method->resource);
+
+   if (input_method && input_method->resource && input_method->context && input_method->context->resource)
+     wl_input_method_send_hide_input_panel(input_method->resource, input_method->context->resource);
 }
 
 static void