Allow focus input context to hide input panel
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 10 Mar 2017 02:34:23 +0000 (11:34 +0900)
committerInHong Han <inhong1.han@samsung.com>
Thu, 16 Mar 2017 01:51:22 +0000 (10:51 +0900)
Since there are cases an application that manually
calls input_panel_show() / hide() without considering
system's input panel policy, sometimes they are
requesting to hide input panel on focus input context that
did not explicitly requested to show in the past.

Change-Id: Ic2b2d35461111faeacc2fd8a33568c3fc47c5cf8
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/e_mod_main.c

index 4d996eec7f276cc724620d43c223aedb2994c7d4..e008653759e89c2afe47f144db17c051cb69cd40 100644 (file)
@@ -1410,8 +1410,12 @@ _e_text_input_cb_input_panel_hide(struct wl_client *client, struct wl_resource *
    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 (g_client == client)
+     {
+        if ((g_old_text_input && (text_input == g_old_text_input)) ||
+            (g_text_input && (text_input == g_text_input)))
+          hide_allowed = EINA_TRUE;
+     }
 
    if (hide_allowed)
      {