Enlightenment CVS committal
Author : tilman
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/canvas
Modified Files:
evas_object_main.c
Log Message:
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.
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_main.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- evas_object_main.c 12 Aug 2006 14:46:15 -0000 1.50
+++ evas_object_main.c 7 Oct 2006 17:35:14 -0000 1.51
@@ -1,6 +1,16 @@
#include "evas_common.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 )
{
if( !l || !l->objects )
@@ -458,17 +468,26 @@
MAGIC_CHECK_END();
if (obj->delete_me) 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->smart_class->move)
obj->smart.smart->smart_class->move(obj, x, y);
}
+#endif
if ((obj->cur.geometry.x == x) &&
(obj->cur.geometry.y == y))
{
evas_object_inform_call_move(obj);
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)
{
pass = evas_event_passes_through(obj);
@@ -522,17 +541,26 @@
if (obj->delete_me) return;
if (w < 0.0) w = 0.0; if (h < 0.0) h = 0.0;
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->smart_class->resize)
obj->smart.smart->smart_class->resize(obj, w, h);
}
+#endif
if ((obj->cur.geometry.w == w) &&
(obj->cur.geometry.h == h))
{
evas_object_inform_call_resize(obj);
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)
{
pass = evas_event_passes_through(obj);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs