don't forward noop move/resize calls to smart objects anymore. code wrapped in ifdefs so you can easily restore the old behaviour if needed.
SVN revision: 26399
This commit is contained in:
parent
7c0ade140e
commit
3074654eaf
|
@ -1,6 +1,16 @@
|
||||||
#include "evas_common.h"
|
#include "evas_common.h"
|
||||||
#include "evas_private.h"
|
#include "evas_private.h"
|
||||||
|
|
||||||
|
/* uncomment the next line if smart objects should be informed
|
||||||
|
* if they are moved to the position they are already in
|
||||||
|
* (e.g. if they are in 0,0 and you call evas_object_move(o, 0, 0)
|
||||||
|
*/
|
||||||
|
/* #define FORWARD_NOOP_MOVES_TO_SMART_OBJS */
|
||||||
|
|
||||||
|
/* likewise, for resizes
|
||||||
|
*/
|
||||||
|
/* #define FORWARD_NOOP_RESIZES_TO_SMART_OBJS */
|
||||||
|
|
||||||
static Evas_Object_List* get_layer_objects_last( Evas_Layer* l )
|
static Evas_Object_List* get_layer_objects_last( Evas_Layer* l )
|
||||||
{
|
{
|
||||||
if( !l || !l->objects )
|
if( !l || !l->objects )
|
||||||
|
@ -458,17 +468,26 @@ evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||||
MAGIC_CHECK_END();
|
MAGIC_CHECK_END();
|
||||||
if (obj->delete_me) return;
|
if (obj->delete_me) return;
|
||||||
if (evas_object_intercept_call_move(obj, x, y)) return;
|
if (evas_object_intercept_call_move(obj, x, y)) return;
|
||||||
|
#ifdef FORWARD_NOOP_MOVES_TO_SMART_OBJS
|
||||||
if (obj->smart.smart)
|
if (obj->smart.smart)
|
||||||
{
|
{
|
||||||
if (obj->smart.smart->smart_class->move)
|
if (obj->smart.smart->smart_class->move)
|
||||||
obj->smart.smart->smart_class->move(obj, x, y);
|
obj->smart.smart->smart_class->move(obj, x, y);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if ((obj->cur.geometry.x == x) &&
|
if ((obj->cur.geometry.x == x) &&
|
||||||
(obj->cur.geometry.y == y))
|
(obj->cur.geometry.y == y))
|
||||||
{
|
{
|
||||||
evas_object_inform_call_move(obj);
|
evas_object_inform_call_move(obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#ifndef FORWARD_NOOP_MOVES_TO_SMART_OBJS
|
||||||
|
if (obj->smart.smart)
|
||||||
|
{
|
||||||
|
if (obj->smart.smart->smart_class->move)
|
||||||
|
obj->smart.smart->smart_class->move(obj, x, y);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
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);
|
||||||
|
@ -522,17 +541,26 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
||||||
if (obj->delete_me) return;
|
if (obj->delete_me) return;
|
||||||
if (w < 0.0) w = 0.0; if (h < 0.0) h = 0.0;
|
if (w < 0.0) w = 0.0; if (h < 0.0) h = 0.0;
|
||||||
if (evas_object_intercept_call_resize(obj, w, h)) return;
|
if (evas_object_intercept_call_resize(obj, w, h)) return;
|
||||||
|
#ifdef FORWARD_NOOP_RESIZES_TO_SMART_OBJS
|
||||||
if (obj->smart.smart)
|
if (obj->smart.smart)
|
||||||
{
|
{
|
||||||
if (obj->smart.smart->smart_class->resize)
|
if (obj->smart.smart->smart_class->resize)
|
||||||
obj->smart.smart->smart_class->resize(obj, w, h);
|
obj->smart.smart->smart_class->resize(obj, w, h);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if ((obj->cur.geometry.w == w) &&
|
if ((obj->cur.geometry.w == w) &&
|
||||||
(obj->cur.geometry.h == h))
|
(obj->cur.geometry.h == h))
|
||||||
{
|
{
|
||||||
evas_object_inform_call_resize(obj);
|
evas_object_inform_call_resize(obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#ifndef FORWARD_NOOP_RESIZES_TO_SMART_OBJS
|
||||||
|
if (obj->smart.smart)
|
||||||
|
{
|
||||||
|
if (obj->smart.smart->smart_class->resize)
|
||||||
|
obj->smart.smart->smart_class->resize(obj, w, h);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
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);
|
||||||
|
|
Loading…
Reference in New Issue