}
}
- if (!(context = E_NEW(E_Input_Method_Context, 1)))
+ input_method->input = text_input;
+ text_input->input_methods = eina_list_append(text_input->input_methods, input_method);
+
+ if (input_method->resource)
+ {
- wl_client_post_no_memory(client);
- ERR("Could not allocate space for Input_Method_Context");
- return;
++ _e_text_input_deactivate(old, input_method, EINA_TRUE);
++ if (g_input_panel_state == E_INPUT_PANEL_STATE_DID_SHOW || g_input_panel_state == E_INPUT_PANEL_STATE_WILL_SHOW)
+ {
- if (!ecore_key_down_handler)
- ecore_key_down_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
- _e_mod_ecore_key_down_cb,
- NULL);
-
- context->resource =
- wl_resource_create(wl_resource_get_client(input_method->resource),
- &wl_input_method_context_interface, 1, 0);
-
-
- if (context->resource)
- wl_resource_set_implementation(context->resource,
- &_e_text_input_method_context_implementation,
- context, _e_text_input_method_context_cb_resource_destroy);
-
- context->input = text_input;
- context->input_method = input_method;
- input_method->context = context;
++ g_old_text_input = old;
+ }
++ }
+
+ if (!_e_text_input_method_create_context(client, input_method, text_input, EINA_TRUE))
+ return;
- if (context->resource)
- wl_input_method_send_activate(input_method->resource, context->resource, text_input->id, EINA_TRUE);
- }
+ g_focused_client = client;
+ if (!ecore_key_down_handler)
+ ecore_key_down_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
+ _e_mod_ecore_key_down_cb,
+ NULL);
#ifdef _TV
set_soft_keyboard_mode();
#endif