summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2014-05-07 12:06:25 -0400
committerMike Blumenkrantz <zmike@samsung.com>2014-05-07 12:06:25 -0400
commitaff4f3516f55316d40b1cf1ae743a146abbad22c (patch)
treef4b380c6543b11f536e560b2f3a89679f5d9b914
parent0b6b75939eea51c83205989174f1fd403894c85f (diff)
downloadenlightenment-aff4f3516f55316d40b1cf1ae743a146abbad22c.tar.gz
clamp ibar menu location to ibar zone
fix T1170 fix T1174
-rw-r--r--src/modules/ibar/e_mod_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index 4653d36e54..37fe999ff2 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -1168,6 +1168,7 @@ _ibar_icon_menu_recalc(IBar_Icon *ic)
{
int x, y, w, h, iw, ih, ox, oy;
Evas_Object *o;
+ E_Zone *zone;
o = ic->menu->o_bg;
@@ -1179,10 +1180,13 @@ _ibar_icon_menu_recalc(IBar_Icon *ic)
e_gadcon_popup_show(ic->menu);
evas_object_geometry_get(ic->o_holder, &x, &y, &iw, &ih);
evas_object_geometry_get(ic->menu->comp_object, &ox, &oy, NULL, NULL);
+ zone = e_gadcon_zone_get(ic->ibar->inst->gcc->gadcon);
if (e_box_orientation_get(ic->ibar->o_box))
ox = (x + (iw / 2)) - (w / 2);
else
oy = (y + (ih / 2)) - (h / 2);
+ ox = E_CLAMP(ox, zone->x, zone->x + zone->w - w);
+ oy = E_CLAMP(oy, zone->y, zone->y + zone->h - h);
evas_object_move(ic->menu->comp_object, ox, oy);
}