forked from enlightenment/efl
Evas: Fix move/resize of smart objects when using a frame (fixes elm
borders in wayland). SVN revision: 66761
This commit is contained in:
parent
40669bf381
commit
8e2de5ae3d
|
@ -458,16 +458,21 @@ evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||||
|
|
||||||
nx = x;
|
nx = x;
|
||||||
ny = y;
|
ny = y;
|
||||||
|
|
||||||
if (!obj->is_frame)
|
if (!obj->is_frame)
|
||||||
{
|
{
|
||||||
int fx, fy;
|
int fx, fy;
|
||||||
|
|
||||||
evas_output_framespace_get(obj->layer->evas, &fx, &fy, NULL, NULL);
|
evas_output_framespace_get(obj->layer->evas, &fx, &fy, NULL, NULL);
|
||||||
nx = x + fx;
|
if (!obj->smart.parent)
|
||||||
ny = y + fy;
|
{
|
||||||
|
nx += fx;
|
||||||
|
ny += fy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evas_object_intercept_call_move(obj, nx, ny)) return;
|
if (evas_object_intercept_call_move(obj, nx, ny)) return;
|
||||||
|
|
||||||
if (obj->doing.in_move > 0)
|
if (obj->doing.in_move > 0)
|
||||||
{
|
{
|
||||||
WRN("evas_object_move() called on object %p when in the middle of moving the same object", obj);
|
WRN("evas_object_move() called on object %p when in the middle of moving the same object", obj);
|
||||||
|
@ -475,6 +480,7 @@ evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((obj->cur.geometry.x == nx) && (obj->cur.geometry.y == ny)) return;
|
if ((obj->cur.geometry.x == nx) && (obj->cur.geometry.y == ny)) return;
|
||||||
|
|
||||||
if (obj->layer->evas->events_frozen <= 0)
|
if (obj->layer->evas->events_frozen <= 0)
|
||||||
{
|
{
|
||||||
pass = evas_event_passes_through(obj);
|
pass = evas_event_passes_through(obj);
|
||||||
|
@ -541,11 +547,14 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
||||||
int fw, fh;
|
int fw, fh;
|
||||||
|
|
||||||
evas_output_framespace_get(obj->layer->evas, NULL, NULL, &fw, &fh);
|
evas_output_framespace_get(obj->layer->evas, NULL, NULL, &fw, &fh);
|
||||||
|
if (!obj->smart.parent)
|
||||||
|
{
|
||||||
nw = w - fw;
|
nw = w - fw;
|
||||||
nh = h - fh;
|
nh = h - fh;
|
||||||
if (nw < 0) nw = 0;
|
if (nw < 0) nw = 0;
|
||||||
if (nh < 0) nh = 0;
|
if (nh < 0) nh = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (evas_object_intercept_call_resize(obj, nw, nh)) return;
|
if (evas_object_intercept_call_resize(obj, nw, nh)) return;
|
||||||
|
|
||||||
|
@ -556,6 +565,7 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((obj->cur.geometry.w == nw) && (obj->cur.geometry.h == nh)) return;
|
if ((obj->cur.geometry.w == nw) && (obj->cur.geometry.h == nh)) return;
|
||||||
|
|
||||||
if (obj->layer->evas->events_frozen <= 0)
|
if (obj->layer->evas->events_frozen <= 0)
|
||||||
{
|
{
|
||||||
pass = evas_event_passes_through(obj);
|
pass = evas_event_passes_through(obj);
|
||||||
|
@ -618,6 +628,7 @@ evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, E
|
||||||
if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
|
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 (x) *x = obj->cur.geometry.x;
|
||||||
if (y) *y = obj->cur.geometry.y;
|
if (y) *y = obj->cur.geometry.y;
|
||||||
if (w) *w = obj->cur.geometry.w;
|
if (w) *w = obj->cur.geometry.w;
|
||||||
|
|
Loading…
Reference in New Issue