diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-05-12 12:10:48 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-05-12 12:10:48 -0400 |
commit | 189dce81f97f2eefa4891fee4d8fa5dc50a886a6 (patch) | |
tree | 90ccf1827c98a99e9fac32bea1f49f4f6d59239d | |
parent | 2854352bc8b092eb82890b88987495d91df020c1 (diff) | |
download | enlightenment-189dce81f97f2eefa4891fee4d8fa5dc50a886a6.tar.gz |
force cursor placement to obey useful zone geometry
-rw-r--r-- | src/bin/e_place.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/bin/e_place.c b/src/bin/e_place.c index f553ac4fcb..fe272e41ea 100644 --- a/src/bin/e_place.c +++ b/src/bin/e_place.c @@ -451,6 +451,7 @@ e_place_zone_cursor(E_Zone *zone, int x EINA_UNUSED, int y EINA_UNUSED, int w, i { int cursor_x = 0, cursor_y = 0; int zone_right, zone_bottom; + int zx, zy, zw, zh; E_OBJECT_CHECK_RETURN(zone, 0); @@ -458,14 +459,16 @@ e_place_zone_cursor(E_Zone *zone, int x EINA_UNUSED, int y EINA_UNUSED, int w, i *rx = cursor_x - (w >> 1); *ry = cursor_y - (it >> 1); + e_zone_useful_geometry_get(zone, &zx, &zy, &zw, &zh); + if (*rx < zone->x) - *rx = zone->x; + *rx = zx; if (*ry < zone->y) - *ry = zone->y; + *ry = zy; - zone_right = zone->x + zone->w; - zone_bottom = zone->y + zone->h; + zone_right = zx + zw; + zone_bottom = zy + zh; if ((*rx + w) > zone_right) *rx = zone_right - w; |