Modified to compare show_req_ctx with deleted_ctx when the input_panel_hide is called
authorInHong Han <inhong1.han@samsung.com>
Thu, 23 Feb 2017 05:54:07 +0000 (14:54 +0900)
committerInHong Han <inhong1.han@samsung.com>
Thu, 23 Feb 2017 11:13:13 +0000 (20:13 +0900)
Change-Id: I93cd81e11cd2a96cf0370207dfb42b8552413d22

src/e_mod_main.c

index 599fda0..63f5d18 100644 (file)
@@ -145,6 +145,7 @@ 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;
 static E_Client *client_surface_ec = NULL;
+static E_Text_Input *g_show_text_input = NULL;
 
 static Eina_List *hooks_ec = NULL;
 
@@ -1331,6 +1332,7 @@ _e_text_input_cb_input_panel_show(struct wl_client *client, struct wl_resource *
 
    text_input->input_panel_visibile = EINA_TRUE;
    g_input_panel_state = E_INPUT_PANEL_STATE_WILL_SHOW;
+   g_show_text_input = text_input;
 
    if (text_input->resource)
      {
@@ -1349,8 +1351,10 @@ _e_text_input_cb_input_panel_hide(struct wl_client *client, struct wl_resource *
 {
    E_Text_Input *text_input = wl_resource_get_user_data(resource);
 
-   if (!g_text_input || (text_input && g_text_input == text_input))
+   if (!g_text_input || (text_input && g_show_text_input == text_input)) {
       _input_panel_hide(client, resource, EINA_FALSE);
+      g_show_text_input = NULL;
+   }
 }
 
 static void
@@ -1771,6 +1775,9 @@ _e_text_input_cb_resource_destroy(struct wl_resource *resource)
         g_client = NULL;
      }
 
+   if (text_input == g_show_text_input)
+     g_show_text_input = NULL;
+
    if (g_text_input == NULL && text_input->input_panel_visibile)
      {
         _input_panel_hide(NULL, resource, EINA_TRUE);