From: Junseok, Kim Date: Thu, 27 Feb 2020 06:10:17 +0000 (+0900) Subject: e_policy_visibility: check partial window when running uniconify_render X-Git-Tag: submit/tizen/20200304.075907~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c23a559849c9dec3bebae8781a5a2ed78437b26;p=platform%2Fupstream%2Fenlightenment.git e_policy_visibility: check partial window when running uniconify_render Change-Id: Iebb00642ae5ddd0dd43e65337f5b111e5207878c --- diff --git a/src/bin/e_policy_visibility.c b/src/bin/e_policy_visibility.c index 295569b799..b3dbc58979 100644 --- a/src/bin/e_policy_visibility.c +++ b/src/bin/e_policy_visibility.c @@ -50,7 +50,7 @@ static void _e_vis_client_grab_remove(E_Vis_Client *vc, E_Vis_Grab static Eina_Bool _e_vis_client_grab_cancel(E_Vis_Client *vc); static void _e_vis_client_job_exec(E_Vis_Client *vc, E_Vis_Job_Type type); static Eina_Bool _e_vis_grab_job_filter(E_Vis_Grab *grab, E_Vis_Job_Type type); -static Eina_Bool _e_vis_ec_activity_check(E_Client *ec, Eina_Bool check_alpha); +static Eina_Bool _e_vis_ec_activity_check(E_Client *ec, E_Client *above, Eina_Bool check_alpha); static void _e_vis_ec_job_exec(E_Client *ec, E_Vis_Job_Type type); static void _e_vis_ec_setup(E_Client *ec); static void _e_vis_ec_reset(E_Client *ec); @@ -520,7 +520,7 @@ _e_vis_update_forground_list(void) if (!evas_object_visible_get(ec->frame)) continue; pol_vis->fg_clients = eina_list_append(pol_vis->fg_clients, ec); - if (_e_vis_ec_activity_check(ec, EINA_TRUE)) + if (_e_vis_ec_activity_check(ec, NULL, EINA_TRUE)) { fg_activity = ec; break; @@ -1518,12 +1518,25 @@ _e_vis_ec_size_is_full(E_Client *ec) } static Eina_Bool -_e_vis_ec_activity_check(E_Client *ec, Eina_Bool check_alpha) +_e_vis_ec_activity_check(E_Client *ec, E_Client *above, Eina_Bool check_alpha) { int x, y, w, h; + int ax, ay, aw, ah; E_Comp_Object_Content_Type type = E_COMP_OBJECT_CONTENT_TYPE_NONE; int check_mapped = 1; + if (above) + { + e_client_geometry_get(above, &ax, &ay, &aw, &ah); + } + else + { + ax = ec->desk->geom.x; + ay = ec->desk->geom.y; + aw = ec->desk->geom.w; + ah = ec->desk->geom.h; + } + /* check if ignored */ if (e_client_util_ignored_get(ec)) return EINA_FALSE; /* check transparent */ @@ -1545,7 +1558,9 @@ _e_vis_ec_activity_check(E_Client *ec, Eina_Bool check_alpha) if (_e_vis_ec_special_check(ec)) return EINA_FALSE; /* check if full screen */ e_client_geometry_get(ec, &x, &y, &w, &h); - if (!E_CONTAINS(x, y, w, h, ec->desk->geom.x, ec->desk->geom.y, ec->desk->geom.w, ec->desk->geom.h)) + E_RECTS_CLIP_TO_RECT(x, y, w, h, ec->desk->geom.x, ec->desk->geom.y, ec->desk->geom.w, ec->desk->geom.h); + E_RECTS_CLIP_TO_RECT(ax, ay, aw, ah, ec->desk->geom.x, ec->desk->geom.y, ec->desk->geom.w, ec->desk->geom.h); + if (!E_CONTAINS(ax, ay, aw, ah, x, y, w, h)) return EINA_FALSE; /* check if obscured by force */ if (ec->visibility.force_obscured) @@ -1723,7 +1738,7 @@ _e_vis_ec_below_activity_clients_get(E_Client *ec, Eina_List **below_list) for (below = e_client_below_get(ec); below; below = e_client_below_get(below)) { - if (!_e_vis_ec_activity_check(below, EINA_FALSE)) continue; + if (!_e_vis_ec_activity_check(below, ec, EINA_FALSE)) continue; E_VIS_CLIENT_GET(vc, below); if (!vc) continue; @@ -1755,13 +1770,8 @@ _e_vis_ec_below_uniconify(E_Client *ec, E_Pol_Vis_Type above_vis_type) { if (ec->zone->display_state == E_ZONE_DISPLAY_STATE_OFF) return EINA_FALSE; - - /* if the ec is not fullfilling the screen, no needs to wait below clients' uniconify */ if (ec->zone != e_zone_current_get()) return EINA_FALSE; - e_client_geometry_get(ec, &x, &y, &w, &h); - if (!E_CONTAINS(x, y, w, h, ec->zone->x, ec->zone->y, ec->zone->w, ec->zone->h)) - return EINA_FALSE; } /* find below activity clients */ @@ -2106,7 +2116,7 @@ E_API Eina_Bool e_policy_visibility_client_is_activity(E_Client *ec) { EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE); - return _e_vis_ec_activity_check(ec, EINA_TRUE); + return _e_vis_ec_activity_check(ec, NULL, EINA_TRUE); } E_API E_Vis_Grab *