Fix issue IME does not show due to window focus issue 09/232909/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 8 May 2020 08:24:52 +0000 (17:24 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 8 May 2020 08:24:56 +0000 (17:24 +0900)
ecore_wl2_window_activated_get() returns incorrect value in some case,
so ecore_wl2_window_keyboard_get will be used like Tizen 5.0

Change-Id: I046c1bf42986b75252e07f842a47c55ae5fd9f1e
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
ism/extras/wayland_immodule/wayland_imcontext.c

index 5951a5d..1ce130e 100644 (file)
@@ -1401,12 +1401,8 @@ set_focus(Ecore_IMF_Context *ctx)
             return EINA_FALSE;
         }
     }
-    else if (!ecore_wl2_window_activated_get(imcontext->window)) {
-        LOGW("ctx : %p, window does not have focus", ctx);
-        return EINA_FALSE;
-    }
 
-    Ecore_Wl2_Input *input = ecore_wl2_window_input_get(imcontext->window);
+    Ecore_Wl2_Input *input = ecore_wl2_window_keyboard_get(imcontext->window);
     if (!input) {
         LOGW("ctx : %p, Can't get Wl_Input", ctx);
         return EINA_FALSE;
@@ -1484,7 +1480,7 @@ set_focus_out(Ecore_IMF_Context *ctx)
     if (g_desired_key_rate > 0.0 && g_focused) {
         g_focused = EINA_FALSE;
 
-        Ecore_Wl2_Input *input = ecore_wl2_window_input_get(imcontext->window);
+        Ecore_Wl2_Input *input = ecore_wl2_window_keyboard_get(imcontext->window);
         if (input) {
             if (!ecore_wl2_input_keyboard_repeat_set (input, g_original_key_rate, g_original_key_delay)) {
                 LOGE ("ecore_wl2_input_keyboard_repeat_set failed.");