From: Doyoun Kang Date: Fri, 27 Nov 2020 07:26:24 +0000 (+0900) Subject: e_policy_wl: handle show/hide request for tizen_policy interface X-Git-Tag: submit/tizen/20201127.083508^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40c9cd89d26ee0e59becfabcd8a657030622da06;p=platform%2Fupstream%2Fenlightenment.git e_policy_wl: handle show/hide request for tizen_policy interface This change is based on tizen_policy version 8. Change-Id: I5b0936d2e22d2fc0238e6a36968e9707d3141553 --- diff --git a/src/bin/e_policy_wl.c b/src/bin/e_policy_wl.c index a803c97fa4..3f752b3c65 100644 --- a/src/bin/e_policy_wl.c +++ b/src/bin/e_policy_wl.c @@ -3260,6 +3260,41 @@ _tzpol_iface_cb_set_appid(struct wl_client *client, struct wl_resource *res_tzpo e_appinfo_pid_set(eai, pid); } +static void +_tzpol_iface_cb_show(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf) +{ + E_Client *ec; + E_Comp_Wl_Client_Data *cdata; + + ec = wl_resource_get_user_data(surf); + EINA_SAFETY_ON_NULL_RETURN(ec); + EINA_SAFETY_ON_NULL_RETURN(ec->frame); + + ELOGF("TZPOL", "SHOW REQUEST", ec); + + cdata = e_client_cdata_get(ec); + if (cdata && !cdata->mapped) + { + if (e_config->raise_before_show) + { + e_client_raise(ec); + ec->post_raise = EINA_FALSE; + } + } +} + +static void +_tzpol_iface_cb_hide(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf) +{ + E_Client *ec; + + ec = wl_resource_get_user_data(surf); + EINA_SAFETY_ON_NULL_RETURN(ec); + EINA_SAFETY_ON_NULL_RETURN(ec->frame); + + ELOGF("TZPOL", "HIDE REQUEST", ec); +} + // -------------------------------------------------------- // tizen_policy_interface // -------------------------------------------------------- @@ -3305,6 +3340,8 @@ static const struct tizen_policy_interface _tzpol_iface = _tzpol_iface_cb_destroy, _tzpol_iface_cb_has_video, _tzpol_iface_cb_set_appid, + _tzpol_iface_cb_show, + _tzpol_iface_cb_hide, }; static void @@ -7677,7 +7714,7 @@ e_policy_wl_init(void) /* create globals */ global = wl_global_create(e_comp_wl->wl.disp, &tizen_policy_interface, - 7, + 8, NULL, _tzpol_cb_bind); EINA_SAFETY_ON_NULL_GOTO(global, err);