On 2012-01-20 at 11:21, Chen Kefeng (CM/ESW2-CN) wrote:
> Maybe I have not stated my problem clearly.
> 
> I describe it again.
> 
> Say, I have two actors on my stage, actor_below and actor_above, both are set 
> reactive. Actor_below lies beneath actor_above. Both of them will get the 
> mouse event, say, button_pressed_event. If it returns FALSE in the callback 
> function of actor_above, the event will be received by the stage instead of 
> actor_below in the bubble phase. My intention is to let actor_below get the 
> event if actor_above is not interested in the event.
> 
> Is there any way to do that?
> Best Regards / Mit freundlichen Grüßen
> CHEN Kefeng 陈科峰
> CM/ESW2-CN
> Tel. +86 512 6767 7549
> Fax +86 512 6762 1200
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Chen 
> Kefeng (CM/ESW2-CN)
> Sent: Thursday, January 19, 2012 10:01 AM
> To: [email protected]
> Subject: Passing touch/mouse input to underlying Actor
> 
> Hi everybody,
> 
> Nice to be here!!
> 
> This problem programs have been bothering me for a long time. I hope that 
> someone could show me the way out.
> 
> In our program we want to forward the unhandled mouse events from one actor 
> to the actors lying below. But if we return FALSE in the signal call back 
> only the parent of the actor will get the event instead.
> 
> Does anybody have the experience to deal with this situation? I would very 
> appreciate it if someone can give me a hint!

events will be bubbled up from the actor to its parent, recursively
until the signal emission will hit the top-level.

if the actors you're placing one on top of the other are not in a
parent-child relationship, then the top-most actor will block the events
for the actor underneath it.

there is no way to avoid that: it's how Clutter works.

you can, strictly speaking, find out the actor underneath the actor
underneath the pointer by hiding the top-most actor, then calling
clutter_stage_get_actor_at_pos(), and finally showing the top-most
actor, but it'll be expensive, and it's not a great plan.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,
Intel Open Source Technology Center
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to