Send candidate show/hide status update to wayland module 36/138736/3
authorJi-hoon Lee <dalton.lee@samsung.com>
Thu, 13 Jul 2017 07:48:05 +0000 (16:48 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Sat, 29 Jul 2017 02:47:03 +0000 (02:47 +0000)
Change-Id: I8a4de6017a95ba3faf9e2c39fea591522967ec05

ism/extras/efl_panel/isf_panel_efl.cpp
ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp
ism/src/isf_info_manager.cpp

index 27c8c37..daf0534 100644 (file)
@@ -1859,6 +1859,8 @@ static bool set_active_ise (const String &uuid, bool launch_ise)
             }
             _info_manager->set_current_toolbar_mode (_ime_info[i].mode);
             if (ise_changed) {
+                /* From Tizen 4.0 all the ISEs need to handle H/W keyboard events */
+                _ime_info[i].options |= ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT;
                 _info_manager->set_current_helper_option (_ime_info[i].options);
                 _info_manager->set_current_ise_name (_ime_info[i].label);
                 _ise_width  = 0;
index ca2b468..519654c 100644 (file)
@@ -3367,6 +3367,26 @@ public:
             wl_input_method_context_update_ise_geometry (_focused_ic->im_ctx, _focused_ic->serial, x, y, width, height);
         }
     }
+
+    void helper_candidate_show(int id, uint32 context_id, const String&  uuid)
+    {
+        WSCContextISF* ic = find_ic(context_id);
+        if (!ic) return;
+
+        if (ic->im_ctx) {
+            wl_input_method_context_update_candidate_state(ic->im_ctx, 1);
+        }
+    }
+
+    void helper_candidate_hide(int id, uint32 context_id, const String&  uuid)
+    {
+        WSCContextISF* ic = find_ic(context_id);
+        if (!ic) return;
+
+        if (ic->im_ctx) {
+            wl_input_method_context_update_candidate_state(ic->im_ctx, 0);
+        }
+    }
 };
 
 extern "C" {
index 332e674..6f26f67 100644 (file)
@@ -627,6 +627,8 @@ public:
     bool helper_candidate_show (void) {
         SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
         LOGD ("");
+        bool ret = false;
+
         int    client;
         uint32 context;
         get_focused_context (client, context);
@@ -637,16 +639,24 @@ public:
             if (it != m_helper_client_index.end ()) {
                 uint32 ctx = get_helper_ic (client, context);
                 m_panel_agent_manager.helper_candidate_show (it->second.id, ctx, m_current_helper_uuid);
-                return true;
+                ret = true;
             }
         }
 
-        return false;
+        /* Inform wayland module that we are showing candidate window */
+        int     focused_client;
+        uint32  focused_context;
+        String  focused_uuid = get_focused_context(focused_client, focused_context);
+        m_panel_agent_manager.helper_candidate_show(focused_client, focused_context, focused_uuid);
+
+        return ret;
     }
 
     bool helper_candidate_hide (void) {
         SCIM_DEBUG_MAIN (4) << __FUNCTION__ << "...\n";
         LOGD ("");
+        bool ret = false;
+
         int    client;
         uint32 context;
         get_focused_context (client, context);
@@ -657,11 +667,17 @@ public:
             if (it != m_helper_client_index.end ()) {
                 uint32 ctx = get_helper_ic (client, context);
                 m_panel_agent_manager.helper_candidate_hide (it->second.id, ctx, m_current_helper_uuid);
-                return true;
+                ret = true;
             }
         }
 
-        return false;
+        /* Inform wayland module that we are hiding candidate window */
+        int     focused_client;
+        uint32  focused_context;
+        String  focused_uuid = get_focused_context(focused_client, focused_context);
+        m_panel_agent_manager.helper_candidate_hide(focused_client, focused_context, focused_uuid);
+
+        return ret;
     }
 
     bool candidate_more_window_show (void) {