e_policy_visibility: crop ec's geom with e_zone geom 91/221991/4
authorJunseok, Kim <juns.kim@samsung.com>
Thu, 9 Jan 2020 01:48:33 +0000 (10:48 +0900)
committerJunSeok Kim <juns.kim@samsung.com>
Thu, 9 Jan 2020 07:36:29 +0000 (07:36 +0000)
Change-Id: Id7ff0cc165d01fb72b82fe5ab99474e10c5b0413

src/bin/e_policy_visibility.c

index 9a9d744bd7755004397eb4fbcf528de999ec5742..7493cb7d625f897937f7833751551a6f67503dd5 100644 (file)
@@ -1647,6 +1647,10 @@ _e_vis_ec_above_visible_type(E_Client *ec, Eina_Bool check_child)
    int ex, ey, ew, eh;
    int ax, ay, aw, ah;
    int cx, cy, cw, ch;
+   int zx, zy, zw, zh;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(ec, E_POL_VIS_TYPE_ALPHA);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(ec->zone, E_POL_VIS_TYPE_ALPHA);
 
    cx = ec->desk->geom.x;
    cy = ec->desk->geom.y;
@@ -1654,11 +1658,15 @@ _e_vis_ec_above_visible_type(E_Client *ec, Eina_Bool check_child)
    ch = ec->desk->geom.h;
 
    e_client_geometry_get(ec, &ex, &ey, &ew, &eh);
+   e_zone_useful_geometry_get(ec->zone, &zx, &zy, &zw, &zh);
 
    // check whether ec is out of its container or not
    if (!E_INTERSECTS(ex, ey, ew, eh, cx, cy, cw, ch))
      return E_POL_VIS_TYPE_NON_ALPHA;
 
+   // crop ec size with zone size
+   E_RECTS_CLIP_TO_RECT(ex, ey, ew, eh, zx, zy, zw, zh);
+
    for (above = e_client_above_get(ec); above; above = e_client_above_get(above))
      {
         if (e_client_util_ignored_get(above)) continue;