if (!obj->is_frame)
{
- int fx, fy;
-
- evas_output_framespace_get(obj->layer->evas, &fx, &fy, NULL, NULL);
- if (!obj->smart.parent)
+ if ((!obj->smart.parent) && (obj->smart.smart))
{
+ int fx, fy;
+
+ evas_output_framespace_get(obj->layer->evas,
+ &fx, &fy, NULL, NULL);
nx += fx;
ny += fy;
}
evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
{
int is, was = 0, pass = 0, freeze =0;
- int nw = 0, nh = 0;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return;
if (obj->delete_me) return;
if (w < 0) w = 0; if (h < 0) h = 0;
- nw = w;
- nh = h;
- if (!obj->is_frame)
- {
- int fw, fh;
-
- evas_output_framespace_get(obj->layer->evas, NULL, NULL, &fw, &fh);
- if (!obj->smart.parent)
- {
- nw = w - fw;
- nh = h - fh;
- if (nw < 0) nw = 0;
- if (nh < 0) nh = 0;
- }
- }
-
- if (evas_object_intercept_call_resize(obj, nw, nh)) return;
+ if (evas_object_intercept_call_resize(obj, w, h)) return;
if (obj->doing.in_resize > 0)
{
return;
}
- if ((obj->cur.geometry.w == nw) && (obj->cur.geometry.h == nh)) return;
+ if ((obj->cur.geometry.w == w) && (obj->cur.geometry.h == h)) return;
if (obj->layer->evas->events_frozen <= 0)
{
if (obj->smart.smart)
{
if (obj->smart.smart->smart_class->resize)
- obj->smart.smart->smart_class->resize(obj, nw, nh);
+ obj->smart.smart->smart_class->resize(obj, w, h);
}
- obj->cur.geometry.w = nw;
- obj->cur.geometry.h = nh;
+ obj->cur.geometry.w = w;
+ obj->cur.geometry.h = h;
evas_object_update_bounding_box(obj);
EAPI void
evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
{
+ int nx = 0, ny = 0;
+
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
return;
return;
}
- if (x) *x = obj->cur.geometry.x;
- if (y) *y = obj->cur.geometry.y;
+ nx = obj->cur.geometry.x;
+ ny = obj->cur.geometry.y;
+
+ if (!obj->is_frame)
+ {
+ int fx, fy;
+
+ evas_output_framespace_get(obj->layer->evas,
+ &fx, &fy, NULL, NULL);
+
+ if ((!obj->smart.parent) && (obj->smart.smart))
+ {
+ if (nx > 0) nx -= fx;
+ if (ny > 0) ny -= fy;
+ }
+ else if ((obj->smart.parent) && (!obj->smart.smart))
+ {
+ if (nx > 0) nx -= fx;
+ if (ny > 0) ny -= fy;
+ }
+ }
+
+ if (x) *x = nx;
+ if (y) *y = ny;
if (w) *w = obj->cur.geometry.w;
if (h) *h = obj->cur.geometry.h;
}
fy = e->viewport.y - e->framespace.y;
fw = e->viewport.w + e->framespace.w;
fh = e->viewport.h + e->framespace.h;
+ if (fx < 0) fx = 0;
+ if (fy < 0) fy = 0;
e->engine.func->output_redraws_rect_add(e->engine.data.output,
fx, fy, fw, fh);
}
e->framespace.clip = evas_object_rectangle_add(e);
evas_object_color_set(e->framespace.clip, 255, 255, 255, 255);
evas_object_move(e->framespace.clip,
- e->framespace.x, e->viewport.y);
+ e->framespace.x, e->framespace.y);
evas_object_resize(e->framespace.clip,
- e->viewport.w - e->framespace.w, e->viewport.h);
+ e->viewport.w - e->framespace.w,
+ e->viewport.h - e->framespace.h);
evas_object_show(e->framespace.clip);
}
else
/* master clip is already present. check for size changes in the
* viewport, and update master clip size if needed */
if ((e->viewport.changed) || (e->output.changed))
- evas_object_resize(e->framespace.clip,
- e->viewport.w - e->framespace.w,
- e->viewport.h);
+ {
+ evas_object_resize(e->framespace.clip,
+ e->viewport.w - e->framespace.w,
+ e->viewport.h - e->framespace.h);
+ }
}
EINA_RECTANGLE_SET(&clip_rect,