From 490560601590bdf009ef7ebc9843db7e072b6e64 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 3 Apr 2020 15:27:02 +0900 Subject: [PATCH] Change the way to check whether window has focus Change-Id: Ie6f2eafc2eebac0e77f66d26ca9a308e3fd352d0 Signed-off-by: Jihoon Kim --- ism/extras/wayland_immodule/wayland_imcontext.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ism/extras/wayland_immodule/wayland_imcontext.c b/ism/extras/wayland_immodule/wayland_imcontext.c index 5d73b07..802021f 100644 --- a/ism/extras/wayland_immodule/wayland_imcontext.c +++ b/ism/extras/wayland_immodule/wayland_imcontext.c @@ -1389,7 +1389,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; } -- 2.7.4