Fix issue IME does not appear when IME window is created after show request 04/160604/3
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 17 Nov 2017 06:15:28 +0000 (15:15 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 17 Nov 2017 06:59:18 +0000 (15:59 +0900)
Change-Id: I58f2712109da3db95b2df74181f98dbeb6d94856
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/e_mod_input_panel.c
src/e_mod_main.c
src/e_mod_main.h

index 1eb308d..9768d7c 100644 (file)
@@ -89,9 +89,13 @@ _e_input_panel_surface_append(E_Input_Panel *input_panel, E_Input_Panel_Surface
 {
    if (!input_panel || !ips) return;
 
+   E_Client *client_surface = e_text_input_client_surface_get();
    ips->resource = resource;
    input_panel->surfaces = eina_list_append(input_panel->surfaces, ips);
-   LOGD("input_panel %p ips %p resource %p", input_panel, ips, resource);
+   LOGD("input_panel %p ips %p resource %p client surface %p", input_panel, ips, resource, client_surface);
+
+   if (client_surface)
+     e_input_panel_transient_for_set(client_surface);
 
    /* When a new input panel surface is created and if we have failed
     * showing input panel previously, try to show it again here */
index 0e7c071..bee020e 100644 (file)
@@ -177,6 +177,12 @@ static void _e_text_input_cb_input_panel_show(struct wl_client *client, struct w
 static void _e_text_input_deactivate(E_Text_Input *text_input, E_Input_Method *input_method, Eina_Bool need_focus_in);
 static Eina_Bool _e_text_input_method_create_context(struct wl_client *client, E_Input_Method *input_method, E_Text_Input *text_input, Eina_Bool need_focus_out);
 
+E_Client *
+e_text_input_client_surface_get(void)
+{
+   return client_surface_ec;
+}
+
 static void
 _e_text_input_log_show(struct wl_resource *resource, uint32_t code, const char *msg, const char *warning_msg)
 {
index 2b29fe2..50c68fe 100644 (file)
@@ -16,6 +16,7 @@ void        e_input_panel_shutdown(void);
 void        e_input_panel_visibility_change(Eina_Bool visible);
 Eina_Bool   e_input_panel_client_find(E_Client *ec);
 Eina_Bool   e_input_panel_client_geometry_get(E_Client *ec, int *x, int *y, int *w, int *h);
+E_Client   *e_text_input_client_surface_get(void);
 EINTERN void   e_input_panel_wait_update_set(Eina_Bool wait_update);
 EINTERN void   e_input_panel_transient_for_set(E_Client *parent);
 void        e_input_panel_show_need_rerun_set(Eina_Bool need_rerun);