I wasn't able to get evas_object_propagate_events_set working as
specified by the documentation. In fact, by reading the code, I don't
see how it can detect that a callback was found. So here is a patch
that just did this, I didn't apply it as I fear I could have
misunderstood the test and break every thing. So please review and
test this patch.
--
Cedric BAIL
From c97d56c0c1d2e8d7e01218fde2acc34c937fa54a Mon Sep 17 00:00:00 2001
From: Cedric BAIL <[EMAIL PROTECTED]>
Date: Mon, 21 Jul 2008 18:03:24 +0200
Subject: [PATCH] Strange fix to conform to evas_object_propagate_events_set API documentation.
---
src/lib/canvas/evas_callbacks.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/lib/canvas/evas_callbacks.c b/src/lib/canvas/evas_callbacks.c
index 35a97ad..daec6dc 100644
--- a/src/lib/canvas/evas_callbacks.c
+++ b/src/lib/canvas/evas_callbacks.c
@@ -69,6 +69,7 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
/* MEM OK */
Evas_Object_List **l_mod = NULL, *l;
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
+ Evas_Bool func_call = 0;
Evas *e;
if (obj->delete_me) return;
@@ -118,7 +119,10 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
if ((fn->type == type) && (!fn->delete_me))
{
if (fn->func)
- fn->func(fn->data, obj->layer->evas, obj, event_info);
+ {
+ fn->func(fn->data, obj->layer->evas, obj, event_info);
+ func_call = 1;
+ }
}
if (obj->delete_me) break;
}
@@ -140,8 +144,7 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
ev->flags = flags;
}
}
-
- if (!((obj->no_propagate) && (l_mod) && (*l_mod)))
+ if (!((obj->no_propagate) && (l_mod) && (*l_mod)) && ((obj->no_propagate && !func_call) || !obj->no_propagate))
{
if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) &&
(type <= EVAS_CALLBACK_KEY_UP))
--
1.5.4.GIT
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel