listen to click events on global.stage/performance between actor button-press-event and stage button-press-event



Hi all,

Is there a way to listen to click events on global.stage whilst
gnome-shell is running?
    global.stage.connect("button-press-event", ...)

It connects up fine but clicks are only registered on the top panel
(w/ activities bar, etc).
Any click in the window area is not passed through to the stage - I
assume it is absorbed by the Clutter.Group containing all the window
actors or something.

I have a bunch of toons running around that have been added to
global.stage, and I'd like to click on them and have them react.

My other alternative to listening to click events on the stage is to
set each toon to reactive:true and listen to button-press events for
each actor.
However the impression I received from the Openismus Clutter
documentation[0] was that this was less efficient than the former
method of listening to the stage's click events and using
.get_actor_at_pos.

In gnome-shell is this the case? I understand other things like
.set_motion_events_enabled and .set_throttle_motion_events are already
true on the global.stage, so perhaps it might be different for this
case. I can have up to 255 toons running around (well really only
limited by the user's memory) and just want to know how 255
button-press listeners compares to a single one + .get_actor_at_pos.

cheers.

[0]: http://www.openismus.com/documents/clutter_tutorial/1.0/docs/tutorial/html/sec-actors-events.html


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]