Selectively enable input panel to display candidates in H/W keyboard mode 11/144311/2
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 16 Aug 2017 07:54:23 +0000 (16:54 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Wed, 16 Aug 2017 08:06:05 +0000 (17:06 +0900)
Change-Id: I2a496c87bf74ee80a1ffe39a93a8329516385600

src/e_mod_main.c

index a657f1981645343c9b60b966678ad473a1ad162f..00614b2d5e08c382193328c13389796ad4a3c1fe 100644 (file)
@@ -320,16 +320,21 @@ _keyboard_mode_changed_cb(keynode_t *key, void* data)
 
    if (val == false)
      {
+#ifdef SUPPORT_CANDIDATE_ONEWINDOW
         /* Switching to S/W keyboard mode, hide input panel since it could be displaying candidate only */
         if (g_disable_show_panel && g_text_input && g_text_input->resource && g_client)
           _input_panel_hide(g_client, g_text_input->resource, EINA_FALSE);
-
+#endif
         g_disable_show_panel = EINA_FALSE;
      }
    else
      {
+#ifdef SUPPORT_CANDIDATE_ONEWINDOW
         /* Switching to H/W keyboard mode, hide input panel only if there is no candidate */
         if (!g_show_state_candidate && g_text_input && g_text_input->resource && g_client)
+#else
+        if (g_text_input && g_text_input->resource && g_client)
+#endif
           _input_panel_hide(g_client, g_text_input->resource, EINA_FALSE);
 
         g_disable_show_panel = EINA_TRUE;
@@ -1462,6 +1467,11 @@ _e_text_input_cb_input_panel_show(struct wl_client *client, struct wl_resource *
         return;
      }
 
+#ifndef SUPPORT_CANDIDATE_ONEWINDOW
+   if (g_disable_show_panel == EINA_TRUE)
+     return;
+#endif
+
    if (g_input_method && g_input_method->resource)
      input_method = wl_resource_get_user_data(g_input_method->resource);
 
@@ -1471,6 +1481,7 @@ _e_text_input_cb_input_panel_show(struct wl_client *client, struct wl_resource *
    if (input_method && (!input_method->context || !input_method->context->resource))
      _e_text_input_method_create_context(client, input_method, text_input, EINA_TRUE);
 
+#ifdef SUPPORT_CANDIDATE_ONEWINDOW
    if (g_disable_show_panel == EINA_TRUE)
      {
         if (g_show_state_candidate == EINA_TRUE)
@@ -1482,6 +1493,7 @@ _e_text_input_cb_input_panel_show(struct wl_client *client, struct wl_resource *
           }
        return;
      }
+#endif
 
    if (input_method && input_method->resource && input_method->context && input_method->context->resource)
      {