Send the response event in the _cb_filter_key_event function if there is no activated... 11/129811/1
authorWonkeun Oh <wonkeun.oh@samsung.com>
Thu, 18 May 2017 05:57:16 +0000 (14:57 +0900)
committerWonkeun Oh <wonkeun.oh@samsung.com>
Thu, 18 May 2017 07:08:34 +0000 (16:08 +0900)
If not, it spend 2 seconds per each key event and then it cause the ANR timeout or deadlock.
Becuase application process(Immodule) will wait for response message for the synchronous communication in the filter_key_event function.

Change-Id: I9c83093d72522b58052b6005e0106240c2ab5312

src/e_mod_main.c

index 6a07ed9..9cee61f 100644 (file)
@@ -1716,9 +1716,21 @@ _e_text_input_cb_filter_key_event(struct wl_client *client EINA_UNUSED, struct w
      input_method = wl_resource_get_user_data(g_input_method->resource);
 
    if (input_method && input_method->context && input_method->context->resource)
-     wl_input_method_context_send_filter_key_event(input_method->context->resource,
-                                                   serial, time, keyname, state, modifiers,
-                                                   dev_name, dev_class, dev_subclass);
+     {
+        wl_input_method_context_send_filter_key_event(input_method->context->resource,
+                                                      serial, time, keyname, state, modifiers,
+                                                      dev_name, dev_class, dev_subclass);
+     }
+   else
+     {
+        if (text_input->resource)
+          wl_text_input_send_filter_key_event_done(text_input->resource, serial, false);
+
+        WTI_WARNING(resource,
+                    WL_DISPLAY_ERROR_INVALID_OBJECT,
+                    "No Input Method");
+     }
+
 }
 
 static void