Modified to compare wl client instead of input context in input_panel_hide callback 42/118942/4
authorInHong Han <inhong1.han@samsung.com>
Tue, 14 Mar 2017 10:54:04 +0000 (19:54 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 28 Mar 2017 04:43:30 +0000 (21:43 -0700)
Change-Id: I87c5ac154982556ea6e22a2500cfa5602312112c

src/e_mod_main.c

index c463ac7..6a07ed9 100644 (file)
@@ -104,6 +104,7 @@ static Ecore_Timer *g_timer_will_hide  = NULL;
 static enum _E_Input_Panel_State g_input_panel_state = E_INPUT_PANEL_STATE_DID_HIDE;
 static E_Client *client_surface_ec = NULL;
 static E_Text_Input *g_show_text_input = NULL;
+static struct wl_client *g_show_client = NULL;
 
 static Eina_List *hooks_ec = NULL;
 
@@ -1341,6 +1342,7 @@ _e_text_input_cb_input_panel_show(struct wl_client *client, struct wl_resource *
          * in order to give a change to update UI */
         LOGD("IM::SHOW::WAIT_FOR_READY\n");
 
+        g_show_client = client;
         wl_input_method_send_show_input_panel(input_method->resource, input_method->context->resource);
 
         /* we need to force update in order to release buffer
@@ -1380,11 +1382,10 @@ _e_text_input_cb_input_panel_show(struct wl_client *client, struct wl_resource *
 static void
 _e_text_input_cb_input_panel_hide(struct wl_client *client, struct wl_resource *resource)
 {
-   E_Text_Input *text_input = wl_resource_get_user_data(resource);
-
-   if (!g_text_input || (text_input && g_show_text_input == text_input)) {
+   if (g_show_client == client) {
       _input_panel_hide(client, resource, EINA_FALSE);
       g_show_text_input = NULL;
+      g_show_client = NULL;
    }
 }