Fix bug not to show IME automatically after detaching USB keyboard 13/245213/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 5 Oct 2020 11:06:30 +0000 (20:06 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 5 Oct 2020 11:06:30 +0000 (20:06 +0900)
Change-Id: I7ea1fca18a85218fa4fe0d058c9c955f33572cff
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/e_mod_main.c

index bb1c8a7..d8962fe 100644 (file)
@@ -66,6 +66,7 @@ struct _E_Text_Input
 
    Eina_List *input_methods;
    Eina_Bool input_panel_visible;
+   Eina_Bool input_panel_show_requested;
    uint32_t id;
 };
 
@@ -327,7 +328,7 @@ _keyboard_mode_changed_cb(keynode_t *key, void* data)
 
    if (val == false)
      {
-        if (!g_disable_show_panel && g_text_input && g_text_input->resource && g_client && g_input_panel_state == E_INPUT_PANEL_STATE_DID_HIDE && g_input_panel_enabled)
+        if (!g_disable_show_panel && g_text_input && g_text_input->resource && g_client && g_input_panel_state == E_INPUT_PANEL_STATE_DID_HIDE && g_text_input->input_panel_show_requested)
           _e_text_input_cb_input_panel_show(g_client, g_text_input->resource);
 
 #ifdef SUPPORT_CANDIDATE_ONEWINDOW
@@ -1271,6 +1272,7 @@ _e_text_input_deactivate(E_Text_Input *text_input, E_Input_Method *input_method,
         if (input_method->context) input_method->context->input = NULL;
         input_method->context = NULL;
 
+        text_input->input_panel_show_requested = EINA_FALSE;
         text_input->input_methods = eina_list_remove(text_input->input_methods, input_method);
 
         if (text_input->resource)
@@ -1475,6 +1477,8 @@ _e_text_input_cb_input_panel_show(struct wl_client *client, struct wl_resource *
         return;
      }
 
+   text_input->input_panel_show_requested = EINA_TRUE;
+
 #ifndef SUPPORT_CANDIDATE_ONEWINDOW
    if (g_disable_show_panel == EINA_TRUE)
      return;