Add missing deactivation request 13/248313/1
authorInHong Han <inhong1.han@samsung.com>
Wed, 25 Nov 2020 07:57:14 +0000 (16:57 +0900)
committerInHong Han <inhong1.han@samsung.com>
Wed, 25 Nov 2020 07:57:14 +0000 (16:57 +0900)
Change-Id: Ib7ed7b843814e506a735ddd95051ed74659db7cd

src/e_mod_main.c

index a89d8e4940280478b274d389d2eba32c3f301f3a..1ff599cf2df4a174a7f13b9cf87db59f8d523870 100644 (file)
@@ -2146,6 +2146,7 @@ _e_text_input_cb_destroy(struct wl_client *client, struct wl_resource *resource)
 {
    E_Text_Input *text_input = wl_resource_get_user_data(resource);
    E_Input_Method *input_method = NULL;
+   Eina_Bool _context_created = EINA_FALSE;
 
    if (!text_input)
      {
@@ -2171,7 +2172,7 @@ _e_text_input_cb_destroy(struct wl_client *client, struct wl_resource *resource)
         (input_method->context ? input_method->context->resource : NULL), resource);
 
    if ((!input_method->context) || (!input_method->context->resource))
-     _e_text_input_method_create_context(client, input_method, text_input, EINA_FALSE);
+     _context_created = _e_text_input_method_create_context(client, input_method, text_input, EINA_FALSE);
 
    if (text_input == g_text_input &&
        input_method->resource && input_method->context && input_method->context->resource)
@@ -2182,6 +2183,9 @@ _e_text_input_cb_destroy(struct wl_client *client, struct wl_resource *resource)
 
         destroyed_resource = input_method->resource;
      }
+
+   if (_context_created)
+     _e_text_input_deactivate(text_input, input_method, EINA_FALSE);
 }
 
 static const struct wl_text_input_interface _e_text_input_implementation = {