Revert "Allow previous input context to hide input panel" 41/118941/5
authorInHong Han <inhong1.han@samsung.com>
Wed, 15 Mar 2017 00:49:36 +0000 (09:49 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 28 Mar 2017 04:43:13 +0000 (21:43 -0700)
This reverts commit 1a6eb52a2c199b0092a2b5e586fd54eb50f4bce5.

Change-Id: I027fc229e411b719f92efb50b15a4862749f67c3

src/e_mod_main.c

index 766b11f..c463ac7 100644 (file)
@@ -104,7 +104,6 @@ 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 E_Text_Input *g_old_text_input = NULL;
 
 static Eina_List *hooks_ec = NULL;
 
@@ -1176,14 +1175,7 @@ _e_text_input_cb_activate(struct wl_client *client, struct wl_resource *resource
      return;
 
    if (old)
-     {
-        _e_text_input_deactivate(old, input_method, EINA_TRUE);
-        if (g_input_panel_state == E_INPUT_PANEL_STATE_DID_SHOW ||
-            g_input_panel_state == E_INPUT_PANEL_STATE_WILL_SHOW)
-          {
-             g_old_text_input = old;
-          }
-     }
+     _e_text_input_deactivate(old, input_method, EINA_TRUE);
 
    input_method->input = text_input;
    text_input->input_methods = eina_list_append(text_input->input_methods, input_method);
@@ -1261,11 +1253,6 @@ _e_text_input_cb_deactivate(struct wl_client *client EINA_UNUSED, struct wl_reso
         g_client = NULL;
      }
 
-   if (text_input == g_old_text_input)
-     {
-        g_old_text_input = NULL;
-     }
-
    /* FIXME: should get input_method object from seat. */
    if (g_input_method && g_input_method->resource)
      input_method = wl_resource_get_user_data(g_input_method->resource);
@@ -1394,22 +1381,11 @@ static void
 _e_text_input_cb_input_panel_hide(struct wl_client *client, struct wl_resource *resource)
 {
    E_Text_Input *text_input = wl_resource_get_user_data(resource);
-   Eina_Bool hide_allowed = EINA_FALSE;
 
-   LOGD("text_input : %p\n", text_input);
-
-   if (!g_text_input || (text_input && g_show_text_input == text_input))
-     hide_allowed = EINA_TRUE;
-
-   if (g_old_text_input && text_input == g_old_text_input && g_client == client)
-     hide_allowed = EINA_TRUE;
-
-   if (hide_allowed)
-     {
-        _input_panel_hide(client, resource, EINA_FALSE);
-        g_show_text_input = NULL;
-        g_old_text_input = NULL;
-     }
+   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