Support to notify after completing effect of hiding IME 20/225620/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 21 Feb 2020 07:30:58 +0000 (16:30 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 21 Feb 2020 07:35:47 +0000 (16:35 +0900)
Change-Id: I60f0b7e366420e01f1970236fc9bf78e80848e9e
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/e_mod_input_panel.c

index 4166be7b3699a256706d520edd202bb8234a4cec..e3f736911d85c2715814a45a9f1ca89c37c78377 100644 (file)
@@ -51,6 +51,8 @@ struct _E_Input_Panel_Surface
    Eina_Bool resizing;
    Ecore_Timer *resize_timer;
 
+   Eina_List *cp_hooks;
+
    E_Client_Hook *hook_del;
    E_Policy_Hook *hook_rotation_geometry_set;
 };
@@ -431,6 +433,7 @@ _e_input_panel_surface_resource_destroy(struct wl_resource *resource)
    E_FREE_FUNC(ips->eh.buf_change, ecore_event_handler_del);
    E_FREE_FUNC(ips->hook_del, e_client_hook_del);
    E_FREE_FUNC(ips->hook_rotation_geometry_set, e_policy_hook_del);
+   E_FREE_LIST(ips->cp_hooks, e_comp_object_hook_del);
    free(ips);
 }
 
@@ -911,6 +914,20 @@ _e_ips_cb_evas_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *e
      }
 }
 
+static Eina_Bool
+_e_input_panel_effect_end(void *data, E_Client *ec)
+{
+   E_Input_Panel_Surface *ips = data;
+   if (!ips) return EINA_TRUE;
+
+   LOGD("Effect end IPS's ec. ips:%p, ips->ec:%p", ips, ips->ec);
+
+   if (!ips->showing)
+      vconf_set_int(VCONFKEY_ISF_INPUT_PANEL_STATE, VCONFKEY_ISF_INPUT_PANEL_STATE_DID_HIDE);
+
+  return EINA_TRUE;
+}
+
 static void
 _e_ips_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
 {
@@ -1132,15 +1149,15 @@ _e_input_panel_cb_surface_get(struct wl_client *client, struct wl_resource *reso
       ecore_event_handler_add(E_EVENT_CLIENT_ROTATION_GEOMETRY_SET,
                               _e_input_panel_client_cb_rotation_geometry_set, ips);
 
-
    ips->hook_del = e_client_hook_add(E_CLIENT_HOOK_DEL, _e_input_panel_client_cb_remove, ips);
    ips->hook_rotation_geometry_set = e_policy_hook_add(E_POLICY_HOOK_CLIENT_ROTATION_GEOMETRY_SET, _e_input_panel_rotation_geometry_set, ips);
 
+   E_COMP_COMP_HOOK_APPEND(ips->cp_hooks, E_COMP_OBJECT_HOOK_EFFECT_END, _e_input_panel_effect_end, ips);
+
    // base_output_resolution.
    e_client_base_output_resolution_update(ec);
 }
 
-
 static const struct wl_input_panel_interface _e_input_panel_implementation = {
      _e_input_panel_cb_surface_get
 };