always use client geometry for comp object centering functions

this should always be more accurate than the object geometry, which may
or may not have been applied at any given time
This commit is contained in:
Mike Blumenkrantz 2017-08-21 10:16:30 -04:00
parent 40df7bddc8
commit 096f1084a5
1 changed files with 2 additions and 2 deletions

View File

@ -3197,7 +3197,7 @@ e_comp_object_util_center_on_zone(Evas_Object *obj, E_Zone *zone)
EINA_SAFETY_ON_NULL_RETURN(zone);
e_zone_useful_geometry_get(zone, &x, &y, &w, &h);
if (cw && (cw->ec->changes.size || cw->ec->new_client))
if (cw)
ow = cw->ec->w, oh = cw->ec->h;
else
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
@ -3230,7 +3230,7 @@ e_comp_object_util_center_on(Evas_Object *obj, Evas_Object *on)
x = cw2->ec->x, y = cw2->ec->y, w = cw2->ec->w, h = cw2->ec->h;
else
evas_object_geometry_get(on, &x, &y, &w, &h);
if (cw && (cw->ec->changes.size || cw->ec->new_client))
if (cw)
ow = cw->ec->w, oh = cw->ec->h;
else
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);