Fixed bug not to send focus_out event to IME 74/117774/2
authorInHong Han <inhong1.han@samsung.com>
Tue, 7 Mar 2017 11:02:24 +0000 (20:02 +0900)
committerInHong Han <inhong1.han@samsung.com>
Tue, 7 Mar 2017 11:12:08 +0000 (20:12 +0900)
Change-Id: Iea2998abb1a9f31a88d659794ab5c96610ebead1

ism/modules/panelagent/wayland/isf_wsc_context.h
ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp

index de2d6af..e3408c1 100644 (file)
@@ -66,7 +66,7 @@ struct _wl_im
     struct weescim *wsc;
     struct wl_input_method *input_method;
     struct wl_input_method_context *im_ctx;
-    int need_focus_event;
+    Eina_Bool need_focus_event;
 };
 
 struct _WSCContextISF {
index fa1a4a1..7edad4e 100644 (file)
@@ -692,7 +692,7 @@ wl_im_destroy ()
     _wl_im_ctx->wsc->wsc_ctx = NULL;
     _wl_im_ctx->input_method = NULL;
     _wl_im_ctx->im_ctx = NULL;
-    _wl_im_ctx->need_focus_event = 0;
+    _wl_im_ctx->need_focus_event = EINA_FALSE;
     _need_wl_im_init = false;
 }
 
@@ -750,8 +750,10 @@ _wsc_im_activate (void *data, struct wl_input_method *input_method, struct wl_in
 
     isf_wsc_context_add (wsc_ctx);
 
-    if (focus_in_event)
+    if (focus_in_event) {
         isf_wsc_context_focus_in (wsc_ctx);
+        _wl_im_ctx->need_focus_event = EINA_TRUE;
+    }
 }
 
 static void
@@ -765,8 +767,12 @@ _wsc_im_deactivate (void *data, struct wl_input_method *input_method, struct wl_
     _wl_im_ctx->wsc = wsc;
     _wl_im_ctx->input_method = input_method;
     _wl_im_ctx->im_ctx = im_ctx;
-    _wl_im_ctx->need_focus_event = focus_out_event;
     _need_wl_im_init = true;
+
+    if (focus_out_event) {
+        isf_wsc_context_focus_out (wsc->wsc_ctx);
+        _wl_im_ctx->need_focus_event = EINA_FALSE;
+    }
 }
 
 static void