Change the way to check whether window has focus 38/229738/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 3 Apr 2020 06:27:02 +0000 (15:27 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 3 Apr 2020 06:42:29 +0000 (15:42 +0900)
Change-Id: Ie6f2eafc2eebac0e77f66d26ca9a308e3fd352d0
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
ism/extras/wayland_immodule/wayland_imcontext.c

index d427e66..0fa5cd2 100644 (file)
@@ -1391,7 +1391,13 @@ set_focus(Ecore_IMF_Context *ctx)
         return EINA_FALSE;
     }
 
-    if (!ecore_wl2_window_activated_get(imcontext->window)) {
+    if (imcontext->canvas) {
+        if (!evas_focus_state_get(imcontext->canvas)) {
+            LOGW("ctx : %p, canvas does not have focus", 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;
     }