discomfitor pushed a commit to branch enlightenment-0.20.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=d1fdf0077cbe171d0710cd95838cb961260b85ad

commit d1fdf0077cbe171d0710cd95838cb961260b85ad
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Jan 7 17:27:36 2016 -0500

    check all corners of an object in e_comp_object_util_zone_get()
    
    if the top left corner is offscreen, checking other corners is still
    valid for returning a useful zone
---
 src/bin/e_comp_object.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c
index 0fa1b00..b2abfbe 100644
--- a/src/bin/e_comp_object.c
+++ b/src/bin/e_comp_object.c
@@ -2854,12 +2854,18 @@ e_comp_object_util_zone_get(Evas_Object *obj)
      zone = cw->ec->zone;
    if (!zone)
      {
-        int x, y;
+        int x, y, w, h;
 
         if (e_win_client_get(obj))
           return e_win_client_get(obj)->zone;
-        evas_object_geometry_get(obj, &x, &y, NULL, NULL);
+        evas_object_geometry_get(obj, &x, &y, &w, &h);
         zone = e_comp_zone_xy_get(x, y);
+        if (zone) return zone;
+        zone = e_comp_zone_xy_get(x + w, y + h);
+        if (zone) return zone;
+        zone = e_comp_zone_xy_get(x + w, y);
+        if (zone) return zone;
+        zone = e_comp_zone_xy_get(x, y + h);
      }
    return zone;
 }

-- 


Reply via email to