Merge branch 'tizen_3.0' into tizen 81/118081/1 accepted/tizen/common/20170309.175355 accepted/tizen/ivi/20170309.072106 accepted/tizen/mobile/20170309.072034 accepted/tizen/tv/20170309.072053 accepted/tizen/unified/20170310.080734 accepted/tizen/wearable/20170309.072059 submit/tizen/20170308.131257 submit/tizen_unified/20170310.011402
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 8 Mar 2017 13:10:54 +0000 (22:10 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 8 Mar 2017 13:10:54 +0000 (22:10 +0900)
Change-Id: I534829203a56e52dca84487a328954204c26039a

1  2 
packaging/e-mod-tizen-wl-textinput.spec
src/e_mod_main.c

index b903d173bb417625325122712d71b186bec54670,c34401baa80e56c14ca341618647c4f319bf62fb..4d996eec7f276cc724620d43c223aedb2994c7d4
@@@ -1175,15 -1171,41 +1210,27 @@@ _e_text_input_cb_activate(struct wl_cli
            }
       }
  
 -        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